0
Write a program that multiple 10 random numbers with do-while
3 Antworten
+ 1
Declare a variable p for your product and assign 1. Then declare a counter variable i for the loop and assign 0 to i. Write your do while loop with the condition that i is smaller 10. Inside your loop read in your Integer and multiply it with your product p.
+ 1
Here is a pseudo code:
p=1; //obtains your result
i = 0; //your counter for the loop
do {
n; // your next number
// Input n
//multiply p with n
i++;
}while( i<10);
// print p
0
couldn't get it can u write the program plese