Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <math.h>
- #include <conio.h>
- using namespace std;
- int linie;
- void rysowanie1(int linie);
- void rysowanie2(int linie);
- int main()
- {
- cout << "Podaj ilość linii do narysowania: ";
- cin >> linie;
- rysowanie1(linie);
- rysowanie2(linie);
- return 0;
- }
- void rysowanie1(int linie)
- {
- for (int i=1;i<=linie;i++)
- {
- for(int j=1;j<=i;j++)
- {
- cout << "*";
- }
- cout << "\n";
- }
- }
- void rysowanie2(int linie)
- {
- for (int i=linie;i>=1;i--)
- {
- for(int j=1;j<=i;j++)
- {
- cout << "#";
- }
- cout << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement