Write a program in JAVA to calculate add of two(2) number
import java . util.*;
class add
{
Public static void main (String obj[])
{
int a , b , c ;
Scanner sc=new scanner (system.in);
System.out.println (“Enter the value of a & b”);
a=sc.nextInt();
b=sc.nextInt();
c=a+b;
system.out.println(“The addition is=”+c);
}
}
class add
{
Public static void main (String obj[])
{
int a , b , c ;
Scanner sc=new scanner (system.in);
System.out.println (“Enter the value of a & b”);
a=sc.nextInt();
b=sc.nextInt();
c=a+b;
system.out.println(“The addition is=”+c);
}
}
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment