Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: C  |  size: 0.39 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <stdio.h>
  2.  
  3. int FtoC()
  4. {
  5.         int C;
  6.         printf("Enter your value: ");
  7.         scanf("%i", &C);
  8.  
  9.         C = C + 1;
  10.         printf("%d", C );
  11.  
  12. }
  13.  
  14.  
  15.  
  16. int menu()
  17. {
  18.         char ch;
  19.         printf("Enter an option: ");
  20.         scanf("%c", &ch);
  21.  
  22.         switch(ch)
  23.         {
  24.                 case '1': FtoC();
  25.                         break;
  26.                 case '2': printf("Options two\n");
  27.                         break;
  28.                 default: printf("No option");
  29.         }
  30.  
  31. }
  32.  
  33.  
  34. int main()
  35. {
  36.         menu();
  37.         return 0;
  38. }