// this program adds two numbers a and b and stores the result in another variable c;
public class sum
{
public static void main(String[] args)
{
int a,b,c;
a=5;
b=3;
c=a+b;
System.out.print("sum = "+c);
}
}
public class sum
{
public static void main(String[] args)
{
int a,b,c;
a=5;
b=3;
c=a+b;
System.out.print("sum = "+c);
}
}
output:
sum = 8
No comments:
Post a Comment
SAY HELLO!!