Advertisement
Guest User

7

a guest
Jun 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.19 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4.  
  5.  
  6.  
  7. void option1()
  8. {
  9.  
  10. }
  11.  
  12. void option2()
  13. {
  14.  
  15. }
  16.  
  17. void option3()
  18. {
  19.  
  20. }
  21.  
  22. void option4()
  23. {
  24.  
  25. }
  26.  
  27. void option5()
  28. {
  29.  
  30. }
  31.  
  32.  
  33. void option6()
  34. {
  35.  
  36. }
  37.  
  38.  
  39. void option7()
  40. {
  41.  
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. void menu()
  54. {
  55.     int choice=0;
  56.     printf("Hello,\n");
  57.     printf("Please choose one of the following:\n");
  58.     printf("1.Read an image file in PGM format\n");
  59.     printf("2.Find all segments\n");
  60.     printf("3.Color the segments\n");
  61.     printf("4.Save the colored image in a compressed foemat\n");
  62.     printf("5.Compress and save the original image in a compressed format\n");
  63.     printf("6.Convert a compressed image to PGM format\n");
  64.     printf("7.Exit\n");
  65.     printf("Please choose by number only:\n");
  66.  
  67.  
  68.     scanf("%d",&choice);
  69.  
  70.     switch(choice)
  71.     {
  72.     case '1':
  73.         option1();
  74.         break;
  75.     case '2':
  76.         option2();
  77.         break;
  78.     case '3':
  79.         option3();
  80.         break;
  81.     case '4':
  82.         option4();
  83.         break;
  84.     case '5':
  85.         option5();
  86.         break;
  87.     case '6':
  88.         option6();
  89.         break;
  90.     case '7':
  91.         option7();
  92.         break;
  93.     default:
  94.         exit(1);
  95.     }
  96.  
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement