Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void option1()
- {
- }
- void option2()
- {
- }
- void option3()
- {
- }
- void option4()
- {
- }
- void option5()
- {
- }
- void option6()
- {
- }
- void option7()
- {
- }
- void menu()
- {
- int choice=0;
- printf("Hello,\n");
- printf("Please choose one of the following:\n");
- printf("1.Read an image file in PGM format\n");
- printf("2.Find all segments\n");
- printf("3.Color the segments\n");
- printf("4.Save the colored image in a compressed foemat\n");
- printf("5.Compress and save the original image in a compressed format\n");
- printf("6.Convert a compressed image to PGM format\n");
- printf("7.Exit\n");
- printf("Please choose by number only:\n");
- scanf("%d",&choice);
- switch(choice)
- {
- case '1':
- option1();
- break;
- case '2':
- option2();
- break;
- case '3':
- option3();
- break;
- case '4':
- option4();
- break;
- case '5':
- option5();
- break;
- case '6':
- option6();
- break;
- case '7':
- option7();
- break;
- default:
- exit(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement