Advertisement
Doda94

Untitled

Dec 17th, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. void sumaPotencija(int a, int b, int c, int n, int *rez1, int *rez2) {
  2.     int suma = a+b+c;
  3.     int an=1, bn=1, cn=1;
  4.  
  5.     for (int i = 1; i <= n; ++i) {
  6.         an *= a;
  7.         bn *= b;
  8.         cn *= c;
  9.     }
  10.     *rez1 = an + bn + cn;
  11.  
  12.     int suman=1;
  13.     for (int i = 1; i <= n; ++i)
  14.         suman *= suma;
  15.     *rez2 = suman;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement