google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write a program to find the sum, difference and product of two numbers

Write a program to find the sum, difference and product of two numbers

0


public class ashish
{
        public static void main(String args[])
        {
                int a,b,s,d,p;
                a=45;
                b=20;
                s=a+b;
                d=a-b;
                p=a*b;
                System.out.println("The sum of two numbers="+s);
                System.out.println("The difference of two numbers="+d);
                System.out.println("The product of two numbers="+p);
        }
}

Expected Output:
The sum of two numbers=65
The difference of two numbers=25

The product of two numbers=900

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top