Untitled
unknown
java
5 months ago
4.1 kB
3
Indexable
import java.util.Scanner; public class MethodsQuiz_Zheng_Patole{ public static void main(String[]args){ Scanner reader = new Scanner(System.in); System.out.print("Give me a base:\t\t\t"); int b = reader.nextInt(); System.out.print("Give me a height:\t\t"); int h = reader.nextInt(); System.out.print("The area of the triangle is: \t"); System.out.println(Triangle(b, h)); System.out.println("\n"); System.out.print("Give me a side length as a double:\t\t\t"); double n = reader.nextDouble(); System.out.print("Now give me a number of sides as an int:\t\t"); int l = reader.nextInt(); System.out.println("The perimeter of the shape is: \t\t\t\t" + Perimeter(n,l)); System.out.println("\n"); Lyrics(); System.out.println(""); Pilgrims(); } public static double Triangle(int b, int h){ double a = (1.0/2) * b * h; return a; } public static double Perimeter(Double n, int l){ double p = n * l; return p; } public static void zero(){ System.out.println("I miss you more than life"); } public static void one(){ System.out.println("Youngblood thinks there's always tomorrow"); System.out.println("I miss your touch on nights when I'm hollow"); System.out.println("I know you crossed a bridge that I can't"); System.out.println("follow"); } public static void two(){ System.out.println("Since the love that you left is all that I get"); System.out.println("I want you to know"); } public static void three(){ System.out.println("That if I can't be close to you"); System.out.println("I'll settle for the ghost of you"); zero(); } public static void four(){ System.out.println("And if you can't be next to me"); System.out.println("Your memory is ecstasy"); zero(); zero(); } public static void five(){ System.out.println("Youngblood thinks there's always tomorrow"); System.out.println("I need more time but time can't be"); System.out.println("borrowed"); System.out.println("I'd leave it all behind if you could follow"); } public static void six(){ System.out.println("Whoa"); System.out.println("Na, na-na"); System.out.println("More than life"); System.out.println("(Oh)"); } public static void seven(){ System.out.println("So if i can't get close to you"); System.out.println("I'll settle for the ghost of you"); System.out.print("But"); zero(); } public static void Lyrics(){ one(); System.out.println(""); two(); System.out.println(""); three(); System.out.println(""); four(); System.out.println(""); five(); System.out.println(""); two(); System.out.println(""); three(); System.out.println(""); four(); System.out.println(""); six(); System.out.println(""); seven(); System.out.println(""); four(); System.out.println("----------------------------------------------------------------------------------------------------------------------------------"); } public static void Pilgrims(){ System.out.println("Hot Chocolate. Hot and chocolatey with marshmellows and whipped cream on top"); //Christmas System.out.println("Cake. Double layered chocolate chipped cake. "); //Birthday System.out.println(""); } }
Editor is loading...
Leave a Comment