programming problem

help in this !!!!

Modify the program so that it asks the user to enter any number other than the number equal to the number of times they've been asked to enter a number. (i.e on the first iteration "Please enter any number other than 0" and on the second iteration "Please enter any number other than 1"m etc. etc. The program must behave accordingly exiting when the user enters the number they were asked not to.)
Last edited on
WTF its the same as the thread earlier
okay
heres the code

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;
int main()
{int i=0;
int number;
for(i=0;i<10;i++)
{    cout<<" Enter number other than" << i;
cin>>number;
if(number == i)
{ 
return 0;
}
}}

this thread is the same thread as earlier
http://www.cplusplus.com/forum/beginner/137763/
Last edited on
Topic archived. No new replies allowed.