Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int menu(void);
- char redirector(selection);
- int loadimage(void);
- int removeimage(void);
- int main(void)
- {
- menu();
- return 0;
- }
- int menu()
- {
- char selection;
- printf("*****OPTION*****MENU*****\n");
- printf("L: Load image\n");
- printf("R: Remove image\n");
- printf("P: Print image\n");
- printf("A: Average image\n");
- printf("H: Horizontal derivative\n");
- printf("V: Vertical derivative\n");
- printf("T: compute hisTogram\n");
- printf("D: search Digram\n");
- printf("M: local Maxima\n");
- printf("Q: Quit program\n");
- printf("*************************\n");
- printf("Select an option: ");
- selection = toupper(getchar());
- printf("%c",selection);
- redirector(selection);
- return;
- }
- char redirector(selection)
- {
- if (selection == L)
- {
- loadimage();
- }
- else if (selection == R)
- {
- removeimage();
- }
- }
- int loadimage()
- {
- printf("Congrats. You've gotten to load image.")
- }
- int removeimage()
- {
- printf("Congrats. You've gotten to remove image.")
- }
Add Comment
Please, Sign In to add comment