Advertisement
mario_mos

test

Jul 24th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <string.h>
  6.  
  7.  
  8. int max(int a , int b)
  9. {
  10. if (a > b)
  11. {
  12. printf("a > b \n", a);
  13.  
  14. }
  15. if(a < b)
  16. {
  17. printf("a < b \n", b);
  18.  
  19. }
  20. else {
  21. printf("a = b \n");
  22.  
  23. }
  24. }
  25.  
  26. int min(int a , int b)
  27. {
  28. if (a > b)
  29. {
  30. printf("a > b \n", b);
  31.  
  32. }
  33. if(a < b)
  34. {
  35. printf("a < b \n"), a;
  36.  
  37. }
  38. if (a == b){
  39. printf("a = b \n");
  40.  
  41. }
  42. }
  43.  
  44. int asscii(char s)
  45. {
  46. printf("Valeur ASCII de %c est %d \n", s, s);
  47. }
  48.  
  49.  
  50.  
  51.  
  52. int main()
  53. {
  54. int a ;
  55. printf("entrez a = \n ");
  56. scanf("%d\n", &a);
  57. int b ;
  58. printf("entrez b = \n ");
  59. scanf("%d\n", &b);
  60. max(a,b);
  61. min(a,b);
  62.  
  63. char c;
  64. printf("Enter a character: ");
  65. scanf("%c", &c);
  66. printf("c en asscii vaut : %d\n", asscii(c));
  67.  
  68.  
  69.  
  70.  
  71.  
  72. return 0;
  73. }
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement