R4R Java SourceCode Addition Example

Addition Example

In this example we are going to add two numbers.

SOURCE CODE



class add
{
public static void main(String args[])
{
int a,b,c;
a=28;
b=12;
System.out.println("The value of a:"+a);
System.out.println("The value of b:"+b);
c=a+b;
System.out.println("The value of a+b is");
System.out.println("c");
}
}

Download Source File