Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int menu();
- int main()
- {
- menu();
- return 0;
- }
- int menu()
- {
- char option;
- int flag = 1;
- 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: ");
- scanf("%c", &option);
- if(option == 'q' || option == 'Q')
- {
- printf("Program Terminated\n");
- flag = 0;
- }
- if(flag == 1)
- {
- menu();
- }
- else
- {
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement