I want my code to print numbers 1 through 10, only if the input is 1 through 10.
so if the user inputs 4, i want the numbers 1-10 to print.
Printable View
I want my code to print numbers 1 through 10, only if the input is 1 through 10.
so if the user inputs 4, i want the numbers 1-10 to print.
Good for you... do you have any questions for us ?
sassy i like it..any more of that and my nips will be hard as stone
what is the code to print?
int z=9;
cin>>z;
if (z>0)
while (z<10)
cout<<"1,2,3,4,5,6,7,8,9<<endl; // instead of having to do this?
also im trying to make the while loop stop printing those numbers. how would i do that?
i thought by making it 9 it would print once and then the second time around it would be 10, create a false statment and stop printing