Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include <stdio.h>
  4. #include "header.h"
  5.  
  6. char * matiere3djv(){
  7.  
  8.  
  9. int choix;
  10. char * matiere;
  11.  
  12. do
  13. {
  14. printf("\n Quelle est la matiere de la note à ajouter: \n");
  15. printf("\n 1-/ TreeJS");
  16. printf("\n 2-/ Anglais professionnel");
  17. printf("\n 3-/ Maths Physique");
  18. printf("\n 4-/ HTML CSS");
  19. printf("\n 5-/ Base de donnee SQL");
  20. printf("\n 6-/ Langage C Avancé");
  21. printf("\n 7-/ Moteur 3D");
  22. printf("\n 8-/ Programme open esgi");
  23. printf("\n 9-/ Projet Annuel");
  24.  
  25. printf("\n 10-/ Sortir !");
  26.  
  27. printf("\n");
  28.  
  29. printf("\n Entrer votre choix : ");
  30. scanf("%d", &choix);
  31.  
  32. switch(choix)
  33. {
  34.  
  35. case 1: printf("\n TreeJS");
  36. matiere="TreeJS";
  37. goto retourner;
  38.  
  39. case 2: printf("\n Anglais professionnel");
  40. matiere= "Anglais professionnel";
  41. goto retourner;
  42.  
  43. case 3: printf("\n Maths Physique");
  44. matiere= "Maths Physique";
  45. goto retourner;
  46.  
  47. case 4: printf("\n HTML CSS");
  48. matiere= "HTML CSS";
  49. goto retourner;
  50.  
  51. case 5: printf("\n Base de donnee SQL");
  52. matiere= "Base de donnee SQL";
  53. goto retourner;
  54.  
  55. case 6: printf("\n Langage C Avance");
  56. matiere= "Langage C Avance";
  57. goto retourner;
  58.  
  59. case 7: printf("\n Moteur 3D");
  60. matiere= "Moteur 3D";
  61. goto retourner;
  62.  
  63. case 8: printf("\n Programme open esgi");
  64. matiere= "Programme open esgi";
  65. goto retourner;
  66.  
  67. case 9: printf("\n Projet Annuel");
  68. matiere= "Projet Annuel";
  69. goto retourner;
  70.  
  71. default : printf("\n Erreur Taper un numero valide");
  72. break;
  73. }
  74.  
  75. }while(choix!=0);
  76.  
  77. retourner:
  78. return matiere;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement