MarcinKrol

Zad 12 - poprawa

Mar 29th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. //Zad 12 - poprawa
  6.  
  7. int a;
  8. void kwadrat()
  9. {
  10. for(int j=1; j<=a; j++)
  11. {
  12. cout<<"*";
  13. for(int i=1; i<=a-1; i++)
  14. {
  15. cout<<"*";
  16. }
  17. cout<<endl;
  18. }
  19. }
  20.  
  21. int main()
  22. {
  23. cout << "Podaj jak dlugi ma byc bok kwadratu" << endl;
  24. cin >> a;
  25. kwadrat();
  26. return 0;
  27. }
Add Comment
Please, Sign In to add comment