Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int SILNIA (int n) {
- int i;
- int s=1;
- for (i=1; i<=n; i++) {
- s=s*i;}
- return s;
- }
- int main(){
- cout<<"Twoja silnia wynosi: "<<SILNIA (6)<<endl;
- cout<<"Twoja silnia wynosi: "<<SILNIA (7)<<endl;
- cout<<"Twoja silnia wynosi: "<<SILNIA (3)<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement