Write a program of three inputted numbers
Answers
import java.util.Scanner;
class Pract
{
public static void BrainlyPromoter()
{
Scanner Brainly = new Scanner(System.in);
System.out.println("Enter first number to be printed.");
double a = Brainly.nextDouble();
System.out.println("Entered number is: "+a);
System.out.println("Enter second number to be printed.");
double b = Brainly.nextDouble();
System.out.println("Entered number is: "+b);
System.out.println("Enter third number to be printed.");
double c = Brainly.nextDouble();
System.out.println("Entered number is: "+c);
}
}
Output:
Enter first number to be printed.
23
Entered number is: 23.0
Enter second number to be printed.
34
Entered number is: 34.0
Enter third number to be printed.
54
Entered number is: 54.0