Guest User

c++ reussi !

a guest
Jan 16th, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void dessineRectangle(int l , int h, char choixCaractere)
  5. {
  6. for(int ligne(0); ligne < h; ligne++)
  7. {
  8. for(int colonne(0); colonne < l; colonne++)
  9. {
  10. cout << choixCaractere;
  11. }
  12. cout <<endl;
  13. }
  14. }
  15.  
  16. int main()
  17. {
  18. int largeur, hauteur;
  19. cout << "Largeur du rectangle : ";
  20. cin >> largeur;
  21.  
  22. cout << "Hauteur du rectangle : ";
  23. cin >> hauteur;
  24.  
  25. char choixCaractere;
  26. cout << "Quel caratere veux tu utiliser : ";
  27. cin >> choixCaractere;
  28.  
  29. dessineRectangle(largeur, hauteur, choixCaractere);
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment