Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float media(int *vetor, int n, int tam){
- if(n <= 0){
- return 0;
- }
- else{
- return vetor[n-1]/(float)tam + media(vetor, n-1, tam);
- }
- }
- int soma(int vetor[], int tam){
- if(tam <= 0){
- return 0;
- }
- else{
- return soma(int vetor[], int tam - 1) + vetor[n - 1];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement