Question: 1 Emport java.util.Scanner; 2 3 public class CallMagicFormula { 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

1 Emport java.util.Scanner; 2 3 public class CallMagicFormula { 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 } // DO NOT MODIFY magic! public static double magic(int a, long b, double c) { return a * b + c * b; } public static void main(String[] args) { // Your code needs to do the following in order: // 1.) Prompt the user to enter a long // 2.) Read in a long from the user } // 3.) Prompt the user to enter a double // 4.) Read in a double from the user // 5.) Prompt the user to enter an int // 6.) Read in an int from the user // 7.) Call the magic method with the aforementioned parameters // 8.) Print out the result returned by the magic method. // // Correct output is shown below, where 1234567890, 32.78, // and 55 were all inputs from the user: // // Enter a long: 1234567890 // Enter a double: 32.78 // Enter an integer: 55 // Magic formula result: 1.0837036938420001E11 // // Your code needs to match the above output. // TODO - write your code below this comment 1 import java.util.Scanner; [ 2 3 public class Circle Area { 7 8 9 10 11 HAHAHAHAH 12 13 14 15 16 17 18 19 20 } 21 public static void main(String[] args) { // Your code needs to do the following, in order: // 1.) Prompt the user to enter a radius // 2.) Read in the radius from the user, as a double // 3.) Calculate the area. Use the value 3.14 for pi. // 4.) Print out the area. // } // Correct output is shown below, where 12 was the specific // value the user input: // // Enter radius: 12 // Area: 452.16 // // Your code needs to match the above output. // TODO - write your code below this comment
Step by Step Solution
There are 3 Steps involved in it
Question 1 import javautilScanner public class CallingMagicFormula public static double magicint a l... View full answer
Get step-by-step solutions from verified subject matter experts
