3:53 pm - Friday March 25, 8805

Java Example program for Addition

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
//Java Example program for Addition
/**
@author:candidjava.com
@description:program for Addition of two numbers
*/
public class Addition
{
public static void main(String args[])
{
int a,b,c;
a=35;//input of first value
System.out.println("enter first value "+"a="+a);
b=46;// input of second value
System.out.println("enter second value "+"b="+b);

c=a+b;// addition of two numbers operation
System.out.println("addition of a+b ="+c);
}
}

output:
enter first value a=35
enter second value b=46
addition of a+b =81

Filed in: Z-A All Java Codes

Comments are closed.