C Programing, While loop not working.
Go to solution
Solved by danejesse1,
In your switch you don't have a break statement. Also, scanf("%d", rerun) needs a &rerun since rerun is an int, not a pointer to an int.
Edit: it looks like you're missing a break statement in your first switch, too.
switch(rerun) {
case 1:
k=0;
break; // Missing this break statement
case 2:
k=1;
system("pause");
}

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now