Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int lignes;
  6. int alea;
  7. alea = rand()%2;
  8. int ligTmp; // lignes temporaires
  9. //Demander cb de lignes
  10. do{
  11. printf("Combien voulez-vous de lignes ?\n");
  12. scanf("%d", &lignes );
  13. }while (lignes =< 1);
  14. // afficher les étoiles et/ou espaces
  15. for (ligTmp =1 ; ligTmp =< lignes ; ligTmp++);
  16. // actions//
  17.  
  18. switch (alea) {
  19. case 0 :
  20. printf("*");
  21. break;
  22. case 1 :
  23. printf(" ");
  24. break;
  25. default:
  26. do{
  27.  
  28.  
  29. }while (lignes =< 1);
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement