Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- int main() // main function
- {
- const int measurement = 100;
- char num[50];
- char option;
- getchar(num, measurement);
- displaychar(num, measurement);
- do
- {
- printf(" Enter another value? Type Y to enter or type N to exit/n : " );
- scanf( "%c%*c", &option);
- option=tolower(option);
- switch (option)
- {
- case 'y' : getchar(num,measurement);
- displaychar(num, measurement);
- break;
- case 'n': printf(" Good Bye have a nice day \n");
- break;
- default: printf(" invalid selection \n");
- }
- } while(option!='n');
- getchar();
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement