I´m completely new to programming and just started some tutorials from the internet. One of them suggested this code for an easy question for the user:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int input;
printf("Please enter a number between 1 and 4:\n");
scanf("%d",&input);
fflush(stdin);
switch(input)
{
case 1: prinft("You entered 1\n");
break;
case 2: prinft("You entered 2\n");
break;
case 3: printf("You entered 3\n");
break;
case 4: printf("You entered 4\n");
break;
default: printf("Unknown Input, please try again\n");
}
system("PAUSE");
return 0;
}
I use Dev-C++ and can´t even compile the code. the "case 1:"-row gets highlighted and the error-message says: 'printf' undeclared (first use this function). Can anybody tell me how to fix this problem?