Help, I'm a C noob, and need help writing this program:
The program will request input of an integer number. if the entered number matches a specific number(an ID number) it will continue. If the entered number does not match the specific number, it has to request a new number. If a "q" is entered it will quit.
I have the basics of it down, I'm just wondering if and where to put a while loop in there, and I've come up with something kind of like this:
#include <stdio.h>
int main()
{
int idnumber;
printf("Enter your student ID number:");
scanf("%d", &idnumber);
if(idnumber==30922419)
{
printf("Correct: Please continue.")
}
}
I know it's flawed, but I've been working on it for days. The main problem that i am having is getting the program to request the number, and what to do from there.
I would appreciate any help.