morriskaleb06 morriskaleb06
  • 16-09-2022
  • Computers and Technology
contestada

write a complete main that will input a decimal number, double it and display the results

write a complete main that will input a decimal number double it and display the results class=

Respuesta :

NotAStudentxD NotAStudentxD
  • 16-09-2022

Answer:

No sure what language you want but since I am best with Java.

class Main {

 public static void main(String[] args) {

   Scanner input = new Scanner(System.in);  // Create a Scanner object

   System.out.println("Enter Number");

double number01 = input.nextLine();  // Read user input

double multi = number01 * 2;

   System.out.println("Number is " + multi);  // Output user input

}

}

Explanation:

Answer Link

Otras preguntas

what does 'bring home the bacon' mean?
what are three ways religion is shown in the media?
Who is Hephaestus? i need some help with this one :)
what does 'have a ball' mean?
What are the Onomatopoeia words in the poem "The Seven Ages of Man" by: William Shakespeare
The length of a swimming pool is 8m longer than its width and the area is 105m2
Solve for x algebraically; (2/3x)+(4/x)=(7/(x+1))
Which Enlightenment scholar discovered that the heart functioned as a pump?
Marks dad works in torontoit is 40 miles awayif he leaves work at 6:24pm at 43 mph what time home
What are the Onomatopoeia words in the poem "The Seven Ages of Man" by: William Shakespeare