Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int liczba;
- int c,i,b;
- void SILNIA(int l)
- {
- c=l;
- b=1;
- for(i = l ; i != 1 ;i--)
- {
- b=b*c;
- c=c-1;
- }
- cout<<"Silnia wynosi:"<<b;
- }
- int main()
- {
- cout << "Podaj liczba z ktorej chcesz obliczyc silnie: " ;
- cin >> liczba;
- SILNIA(liczba);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement