Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <stdlib.h>
  3. int main () {
  4. float valor,produto;
  5. int idade,cidade,tempoh;
  6. char y,n;
  7. system ("color 3f");
  8. system ("cls");
  9. printf ("\t===============================================================\n");
  10. printf ("\t=========================Legal Rent a Car======================\n");
  11. printf ("\t===============================================================\n\n");
  12.  
  13.  
  14. printf ("Informe sua idade!!\n");
  15. scanf ("%d",&idade);
  16.  
  17. if (idade < 20) {
  18. system ("cls");
  19. printf ("\t===============================================================\n");
  20. printf ("\t=========================Legal Rent a Car======================\n");
  21. printf ("\t===============================================================\n\n");
  22.  
  23. printf ("A Legal Rent a Car somente disponibiliza aluguel de carros para maiores de 21 anos!!");
  24. }
  25. else if (idade >=21) {
  26. system ("cls");
  27. printf ("\t===============================================================\n");
  28. printf ("\t=========================Legal Rent a Car======================\n");
  29. printf ("\t===============================================================\n\n");
  30.  
  31. printf ("Voce tem sua habilitacao a mais de 2 anos?\n1-Sim\n2-Nao\n");
  32. scanf ("%d",&tempoh);
  33. switch (tempoh) {
  34. case 1:
  35. system ("cls");
  36. printf ("\t===============================================================\n");
  37. printf ("\t=========================Legal Rent a Car======================\n");
  38. printf ("\t===============================================================\n\n");
  39.  
  40. printf ("Voce faz parte de uma ONG?");
  41. break;
  42. case 2:
  43. system ("cls");
  44. printf ("\t===============================================================\n");
  45. printf ("\t=========================Legal Rent a Car======================\n");
  46. printf ("\t===============================================================\n\n");
  47.  
  48. printf ("nao tenho habilitação");
  49. break;
  50. default:
  51. printf ("DEU BOM");
  52. }
  53. }
  54.  
  55. return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement