/*Adding two numbers predefined*/
import java.io.*;
class adding
{
public static void main(String args[])
{
int a,b,c;
a= 5;
b=7;
c= a+b;
System.out.println("Sum of the given number is "+c);
}
}
OUTPUT
H:\>path=C:\jdk1.3\bin;
H:\>javac adding.java
H:\>java adding
Sum of the given number is 12
No comments:
Post a Comment