how to write a simple while loop??help!!

i want to write a simple while loop that repeats if this condition is true
and how to exit the loop if its false..
i know how to do a do while but i want a simpler way to just use a while loop since this is just a part of my program.

1
2
3
4
5
6
  while ((mark<0)||(mark>100))
 	 {
 	 	cout<<"renter mark;
 	 	cin>>mark;
 	 }
	   
closed account (3qX21hU5)
1
2
3
4
5
while (mark < 0 || mark > 100)
{
    cout << "reenter mark";   // Your missing a "
    cin >> mark;
}


Other then that the whole loop should run if the number is not between 0 and 100.

Also you don't need the extra ( ) around each condition.
thanks very much sir..
Topic archived. No new replies allowed.