write a Java program input 3 numbers than find out their addition and multiplication and print it. (Note:Be sure that the number must be of float type).
Answers
Answered by
0
Answer:
1,2,3.ama right okkkkkkkkkklkko
Answered by
1
Program:
import java.util.Scanner;
public class cal{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the first number: ");
float n1 = sc.nextFloat();
System.out.print("Enter the second number: ");
float n2 = sc.nextFloat();
System.out.print("Enter the third number: ");
float n3 = sc.nextFloat();
float addition = n1+n2+n3;
float multiplication = n1*n2*n3;
System.out.println("Addition: "+addition);
System.out.println("multiplication: "+multiplication );
}
}
Please give brainliest if you got your answer
Similar questions