Having a little trouble with a basic program that i wrote. it's supposed to convert the digital number input into a text output. when i compile the program it shows no errors but when i run it it has an error that causes it to close. I'm trying to teach myself c prog right now but there's always questions that arise. Thanks
Code:
#include <stdio.h>
int main()
{
int num1;
float num1;
printf("Please enter a single digit number:");
scanf("%f",num1);
if(num1==1)
printf("%s %f","You entered the number one",num1);
else if(num1==2)
printf("%s %f","You entered the number two",num1);
else if(num1==3)
printf("%s %f","You entered the number three",num1);
else if(num1==4)
printf("%s %f","You entered the number four",num1);
else if(num1==5)
printf("%s %f","You entered the number five",num1);
else if(num1==6)
printf("%s %f","You entered the number six",num1);
else if(num1==7)
printf("%s %f","You entered the number seven",num1);
else if(num1==8)
printf("%s %f","You entered the number eight",num1);
else if(num1==9)
printf("%s %f","You entered the number nine",num1);
else
printf("error");
scanf("%f", num1");
return 0;
}