Advertisement
Sierra_ONE

Find My Jeepney!

Oct 8th, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.87 KB | Source Code | 0 0
  1. /*
  2. 4. Find My Jeepney!
  3. I've lived in Cebu my entire life, and my main form of transportation has always been the Jeepney. Even then, I still don't know where some of the Jeepneys wait for their passengers. So instead of waiting for a solution, why not make my own? Introducing Find My Jeepney! An app that would tell you where a Jeepney waits for passengers just by inputting its number and letter! I'm interested in hiring you as the developer, but I'm not sure if you're the right fit. If you could make me a prototype right now then I'll hire you on the spot.
  4.  
  5. Locations:
  6. 12A - Carbon
  7. 12C - Panganiban
  8. 12F - Taboan
  9. 12G or 12I - Mabolo
  10. 12L - Labangon
  11. 13C - Talamban
  12. 14D - Capitol
  13.  
  14. Inputs
  15. 1. The jeepney's number
  16. 2. The jeepney's letter
  17. */
  18.  
  19. #include <stdio.h>
  20.  
  21. int main(){
  22.    
  23.     int number,jeepney;
  24.     char letter;
  25.      
  26.     printf("Enter the jeepney's number: ");
  27.     scanf("%d",&number);
  28.     printf("Enter the jeepney's letter: ");
  29.     scanf("%c",&letter);
  30.    
  31.    
  32.     if ( number == 12){
  33.            
  34.         scanf("%c",&letter);
  35.             switch(letter){
  36.                 case 'A':
  37.                 case 'a':
  38.                     printf("Usual location = Carbon");
  39.                     break;
  40.                 case 'C':
  41.                 case 'c':
  42.                     printf("Usual location = Panganiban");
  43.                     break;
  44.                 case 'F':
  45.                 case 'f':
  46.                     printf("Usual location = Taboan");
  47.                     break;
  48.                 case 'G':
  49.                 case 'g':
  50.                     printf("Usual location = Mabolo");
  51.                     break;
  52.                 case 'I':
  53.                 case 'i':
  54.                     printf("Usual location = Mabolo");
  55.                     break;
  56.                 case 'L':
  57.                 case 'l':
  58.                     printf("Usual location = Labangon");
  59.                     break;
  60.             }  
  61.         }
  62.     else if ( number == 13 ){
  63.         scanf("%c",&letter);
  64.             switch(letter){
  65.                 case 'C':
  66.                 case 'c':
  67.                     printf("Usual location = Talamban");
  68.                     break; 
  69.     }
  70. }
  71.     else if( number == 14 ){
  72.         scanf("%c",&letter);
  73.             switch(letter){
  74.                 case 'D':
  75.                 case 'd':
  76.                     printf("Usual location = Capitol");
  77.                     break;
  78.             }
  79.     }
  80.  
  81.  
  82.     return 0;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement