Write a program to find addition of two numbers

Write a program to find addition of two numbers
class test
{
public static void main(String args[])
{
int x, y, z;
x = 10;
y = 20;
z = x + y;
System.out.println(“Sum of x and y = “+z);
}
}

Output:
Sum of x and y =30

Leave a Reply

Your email address will not be published. Required fields are marked *