import java.util.'*';
class arithmetic operations
{
public static void main (string args[])
{
int a,b,c,d,e,f;
float r;
scanner os= new scanner (system.in);
system.out.println("enter a,b values");
a= os.next int();
b= os.next int();
c= a+b
d= a-b
e= a*b
f=a%b
r= (float) a/b;
system.out.println("a value :" +a);
system.out.println("b value :" +b);
system.out.println("sum of a,b value :" +c);
system.out.println("difference of a,b :"+d);
system.out.println("product of a,b :" +e);
system.out.println("division of a,b :" +r);
system.out.println("remainder of a,b :" +f);
}
}
class arithmetic operations
{
public static void main (string args[])
{
int a,b,c,d,e,f;
float r;
scanner os= new scanner (system.in);
system.out.println("enter a,b values");
a= os.next int();
b= os.next int();
c= a+b
d= a-b
e= a*b
f=a%b
r= (float) a/b;
system.out.println("a value :" +a);
system.out.println("b value :" +b);
system.out.println("sum of a,b value :" +c);
system.out.println("difference of a,b :"+d);
system.out.println("product of a,b :" +e);
system.out.println("division of a,b :" +r);
system.out.println("remainder of a,b :" +f);
}
}
No comments:
Post a Comment