I've created this program and I'm trying to run in codeblocks 8.02 but it doesn't get further than the intial user input.
The program should use a menu system to run funtions which double, square or cube their input number.
Any ideas???
Code:#include <stdio.h> #include <stdlib.h> int doublenum(int userin); int square(int userin); int cube(int userin); int main(void) { int menuchoice = 0, userin, out; printf("\nEnter a number: "); scanf("%d", &userin); while(menuchoice != 4); { printf("\n1\tDouble\n2\tSquare\n3\tCube4\tQuit\n\nPlease choose an option: "); scanf("%d", &menuchoice); switch (menuchoice) { case 1: out = doublenum(userin); printf("\n%d", out); break; case 2: out = square(userin); printf("\n%d", out); break; case 3: out = cube(userin); printf("\n%d", out); break; default: printf("\nMENU CHOICE ERROR!\n"); break; } } return 0; } int doublenum(int userin) { return userin + userin; } int square(int userin) { return userin * userin; } int cube(int userin) { return userin * userin * userin; }