Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. /*************Lobet**Mathieu***1eGestion***2104*************/
  2. #define _CRT_SECURE_NO_WARNINGS
  3.  
  4.  
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7.  
  8.  
  9.  
  10. void main(void)
  11. {
  12. short n, i=0, j=0, ligne=1, colonne=1, add, resset;
  13. do
  14. {
  15. system("cls");
  16. printf("Quelle table de multiplication voulez vous afficher?\n");
  17. scanf("%hd", &n);
  18.  
  19. while (colonne<=n)
  20. {
  21. printf("%hd\t",colonne);
  22. colonne++;
  23. }
  24.  
  25.  
  26. printf("\n--------------------------------------------");
  27.  
  28.  
  29. for(i=1;colonne<=n;ligne++, j++)
  30. {
  31. printf("\n%hd|",ligne);
  32. i=1;
  33. for(i=1;i<=n;i++)
  34. {
  35. add=i*j;
  36. printf("\t%hd ",add);
  37. i++;
  38. }while(i<=n);
  39.  
  40. colonne++;
  41. j++;
  42. }
  43. fflush(stdin);
  44. printf("\nVoulez vous recommencer?(1:oui autres: non)\n");
  45. scanf("%hd", &resset);
  46. }while(resset==1);
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement