Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void rysuj(int h, int hP)
- {
- if(h!=0) cout<<"|";
- if(h>hP/2)
- {
- for(int i=0;i<hP-h;i++)
- {
- cout<<" ";
- }
- cout<<"\\"<<endl;
- rysuj(h-1,hP);
- }
- else if(h<=hP&&h!=0)
- {
- for(int i=0;i<h-1;i++)
- {
- cout<<" ";
- }
- cout<<"/"<<endl;
- rysuj(h-1,hP);
- }
- }
- int main()
- {
- int wysokosc=10,wysokoscP=wysokosc;
- rysuj(wysokosc,wysokoscP);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement