write a program to find addition of three numbers using scanner class
Answers
Answered by
13
import java.util.*;
class Addition
{
public static void main()
{
Scanner sc=new scanner (System.in);
int a,b,c,add;
System.out.println("Enter the value of a,b,c");
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
add=a+b+c;
System.out println("Print the sum="+add);
}
}
class Addition
{
public static void main()
{
Scanner sc=new scanner (System.in);
int a,b,c,add;
System.out.println("Enter the value of a,b,c");
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
add=a+b+c;
System.out println("Print the sum="+add);
}
}
Similar questions