carre.cpp 582 B

1234567891011121314151617181920212223242526
  1. #include "carre.h"
  2. using namespace std;
  3. void carrer( const int &l )
  4. {
  5. for ( int y(0); y<l; y++ ) { /// Dessine l lignes
  6. for ( int x(0); x<l; x++ ) { /// De chacune l caractères
  7. cout << " M";
  8. }
  9. cout << endl;
  10. }
  11. }
  12. void bord( const int &l )
  13. {
  14. for ( int y(0); y<l; y++ ) { /// Dessine l lignes
  15. for ( int x(0); x<l; x++ ) { /// De chacune l caractères
  16. if ( x == 0 || x == l-1 || y == 0 || y == l-1 )
  17. cout << " M";
  18. else
  19. cout << " ";
  20. }
  21. cout << endl;
  22. }
  23. }