Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNNINGS
- #include <stdio.h>
- void Greeting() {
- printf("Hello, welcome to the number letter converter\n");
- }
- int userinput() {
- printf("Would you like to create a letter from a number (Enter 1)\n");
- printf("Or a number from a letter (Enter 2)\n");
- printf("Please enter 1 or 2:");
- int option;
- scanf("%d", &option);
- }
- int main() {
- int numberInput;
- char letterInput;
- int option;
- Greeting();
- int option = userinput();
- if (option == 1) {
- printf("Please enter a number:");
- scanf("%d", &numberInput);
- }
- if (option == 2) {
- printf("Please enter a letter:");
- scanf("%d", &letterInput);
- }
- else printf("Please enter a 1 or 2");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement