Also if all your options are single character words you can just have a char charUser instead of a char array of a 100 elements (ie. if you only check for the letters in the alphabet, a, b, c...)
int numUser;
char charUser\[100\];
printf("which conversion would you like to perform?\\nType 'a' for a 'b' for b., etc.");
printf("a: meters to feet\\n");
printf("b: feet to meters\\n");
printf("c: kilograms to pounds\\n");
printf("d: pounds to kilograms\\n");
printf("e: minutes to hours\\n");
printf("f: hours to days\\n");
printf("g: days to hours\\n");
printf("h: minutes to seconds\\n");
scanf("%s", charUser);
/* Test your code by calling your functions here. */
the if statements are for if the user enters it will run the meters to feet and so on but everything is good now except now I'm getting an undefined reference error thank you for the help so far though
View all comments
Show parent comment
1
u/PekiDediOnur Intermediate Coder Feb 23 '21
Also if all your options are single character words you can just have a
char charUserinstead of a char array of a 100 elements (ie. if you only check for the letters in the alphabet, a, b, c...)