Computer Science, asked by rock0, 9 months ago

make a program to print the sum and multiplication of the number 1 to 30​

Answers

Answered by Pragya3918red
3

Explanation:

class Calculation

{

void input ( )

{

int s = 0 , p = 1, i ;

for (i = 1; i< =30; i ++)

{

s = s + i;

p = p*i;

}

System.out.println(" The sum of the numbers is "+s);

System.out.println(" The product of the numbers is "+p);

}

}

THIS PROGRAM IS IN JAVA.

I HOPE THIS ANSWER WILL HELP YOU AND PLEASE MARK THIS ANSWER THE BRAINLIEST ONE...

Answered by rekhayadav2031981
0

Answer:

yo yo honey singh6ttdye7f7r8t8r8t8by

Similar questions