write a java program to accept three numbers and print it's total.
marking of brainliest will be done...
Answers
Answered by
1
Answer:
import java.util.*;
class Total
{
public static void main()
{
Scanner sc=new Scanner(System.in);
int i=1,t=0,inp=0;
for(;i<=3;i++)
{
System.out.print("Input no."+i+":");
inp=sc.nextInt();
t+=inp;
}
System.out.print("Total is:"+t);
sc.close();
}
}
Similar questions
History,
5 months ago
Math,
5 months ago
English,
5 months ago
Social Sciences,
10 months ago
Math,
10 months ago