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