Java Program to add two numbers
Published in
Jan 17, 2024
class P003_Addition
{
public static void main(String args[])
{
int No1,No2,Sum;
No1=10;
No2=20;
Sum=No1+No2;
System.out.println("Sum=" + Sum);
}
}
Output:
sum=30
class P003_Addition
{
public static void main(String args[])
{
int No1,No2,Sum;
No1=10;
No2=20;
Sum=No1+No2;
System.out.println("Sum=" + Sum);
}
}
Output:
sum=30