Guest User

c++

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