Advertisement
Specowy

siln wskaz

Nov 9th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. void findFact(int,int*);
  3. int main()
  4. {
  5.          int siln;
  6.          int num1;
  7.         printf(" Wprowadz liczbe do silni: ");
  8.         scanf("%d",&num1); 
  9.             printf(" -----------------------------\n ");
  10.          find(num1,&siln);
  11.          printf(" silnia z %d to : %d \n\n",num1,siln);
  12.          return 0;
  13.         }
  14.  
  15. void find(int n,int *f)
  16.         {
  17.         int i;
  18.        *f =1;
  19.        for(i=1;i<=n;i++)
  20.        *f=*f*i;
  21.        }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement