I am trying to run a program to loop and check that the number I entered is:
1) between 0 - 9999
2) does not contain digit 1,2 or 3 (if so, cout a message)
3) does contain digit 1,2, or 3
I have tried to key in the following but unfortunately I couldn't run it.
#include <iostream> //For 'cout' and 'cin'
#include <iomanip> //NEW ONE! for 'toupper' function
using namespace std;
int main()
{
int num,num1,num2, num3, num4;
int dig1, dig2, dig3, dig4;
Please edit your post and make sure your code is [code]between code tags[/code] so that it has line numbers and syntax highlighting, as well as proper indentation.
You need an extra set of parentheses around your while loop condition. Also, your formatting is horrible - why do you put conditions on their own lines?