Lukasz_Miskiewicz

Zadanie 12

Mar 31st, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int a,b,c;
  4.  
  5. void kwadrat(int a)
  6. {
  7. int b=0, c=0;
  8. while(b<a)
  9. {
  10. while(c<a)
  11. {cout << "*";
  12. c++;}
  13. cout << endl;
  14. c=0;
  15. b++;
  16. }
  17. }
  18.  
  19. int main()
  20. {
  21. cout<<"podaj liczbe naturalna"<<endl;
  22. cin>>a;
  23. kwadrat(a);
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment