#include <stdio.h>
#include <stdlib.h>
int soma(int* a, int b){
int soma = 0;
for(int i = 0; i < b; i++){
soma = soma + a[i];
}
return soma;
}
int main(){
int nums[3];
nums[0] = 10;
nums[1] = 20;
nums[2] = 30;
int total = soma(nums, 3);
printf("%d", total);
}