Basic Java Programs
PROGRAMMING AND KNOWLEDGE...... By AKASH PANDYA
Pages
Home
IF - ELSE
LOOPS
ADVANCE PROGRAMS
PROJECTS AND GAMES
ABOUT
To add two number where numbers are already given or initialized
Program :
class Add
{
public static void main (String [] args)
{
int a,b,c=0; // declaration
a= 12;
b=23;
c= a + b;
System.out.println("The addition of two number is:" +c);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment