-
Help!!!!!!!!!!!
I have to write another program for school and this one may be alittle easier....im just so stuck right now!!! Ok, you have to write a code for a program that displays random numbers on the screen and doesnt stop generating the random numbers until it hits zero.....after it hits zero, on the next line it needs to display how many numbers there are
-
Code? You must post code to get help with CODE!
-
Code!
Code:
/* random numbers */
#include<iostream.h>
int main()
{
randomize()
int i;
i = rand(9);
cout << i << endl;
return(0);
}
-
Don't title your threads "help" please.
-
Mainly what you're missing is a loop, a conditional, and another variable to count the numbers. Sections on each of those should be very clearly labelled in your book. Do you have any specific questions on any of them?
-
think of what it needs to do
I want it to do the following
generate an int and display to screen
check to see if int is 0
if int is 0 stop
now I want it to tell me how many numbers it was untill I reached 0
When you write code think in simple steps and write code to complete the simple steps.