/*PROGRAM TO ADD TWO NUMBERS*/
PROGRAM:
import.java.io.*;
class add //Creation of Class
{
public static void main(string args[ ]) //Main function
{
int a=10,b=20; //Declaration of variables
int c;
c=a+b;
system.out.println("ADDITION OF TWO NUMBER IS "+c); //print the statement
}
}
SAMPLE OUTPUT:
ADDITION OF TWO NUMBERS IS 30
Try Your Self
1) Program for Find Simple Interest using your own variables and store the result in the variable si.
*find the solution of this program at solution page tomorrow
No comments:
Post a Comment