Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int suma(char* tab[], int dlugosc)
  3. {
  4.     int wynik = 0;
  5.     int i;
  6.     for(i=1;i<dlugosc;i++)
  7.         wynik+=atoi(tab[i]);
  8.     return wynik;
  9. }
  10.  
  11. int main(int argc, char* argv[])
  12. {
  13.         int x = suma(argv, argc);
  14.     printf("Wynik sumowania to: %d\n", &x);
  15.         return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement