Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #define ILOSC_PIETER 20
- using namespace std;
- int SilniaRek(int n)
- {
- if(n == 0) return 1;
- if(n == 1) return 1;
- return SilniaRek(n - 1) * n;
- }
- int main(int argc, char* argv[])
- {
- int liczPietra = 0;
- int liczDlugosc = liczPietra;
- while(liczPietra <= ILOSC_PIETER)
- {
- for(int i = -1; i < liczDlugosc && liczDlugosc < ILOSC_PIETER ; i++)
- cout << "*";
- cout << endl;
- liczDlugosc++;
- liczPietra++;
- }
- cout << endl << SilniaRek(6);
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement