Computer Science, asked by amirrahim712, 1 year ago

Write a program in java to assign three integers and print their sum and products

Answers

Answered by sikhi
0
hope it helps you......
Attachments:
Answered by anindyaadhikari13
3

\star\:\:\:\sf\large\underline\blue{Question:-}

  • Write a program in Java to assign three integers and print their sum and product.

\star\:\:\:\sf\large\underline\blue{Code:-}

So, here is the code given below.

class x

{

public static void main(String s[])

{

int a=5,b=10,c=15;

int p=a*b*c;

int s=a+b+c;

System.out.println("Sum is: "+s);

System.out.println("Product is: "+p);

}

}

Similar questions