How to add two numbers using third variable in java.
class AddExample
{
public static void main(String args[])
{
int
a=5,b=6,sum;
sum=a+b;
System.out.println(“sum
= ”+sum);
}
}
OUTPUT :
sum=11
No comments:
Post a Comment