Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int SILNIA(int n)
- {
- int wynik = 1;
- do
- {
- wynik*=n;
- n--;
- }
- while(n>0);
- return wynik;
- }
- int main()
- {
- cout << SILNIA(5) << endl;
- cout << SILNIA(0) << endl;
- cout << SILNIA(7) << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment