Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int sil(int n) {
- int reto=1;
- for(int i=1;i<=n;i++) {
- reto *= i;
- } return reto;
- }
- int main() {
- int n;
- cout << "Podaj n: ";
- cin >> n;
- cout << "Silnia(n) = " << sil(n);
- return 0x0;
- }
Advertisement
Add Comment
Please, Sign In to add comment