2
Prepare a program that asks the user to enter 10 values, add this results and present on the screen.
I could only do it with one array whole.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i, soma;
soma = 0;
int num[10];
printf("Digite 10 numeros para somar:\n");
for(i= 0; i<10; i++) {
printf("Digite a %d nota: ", i+1);
scanf("%d", &num[i]);
soma +=num[i];
}
printf("\nSoma = %d : ", soma);
system("pause");
return 0;
}
How do I add the 10 read values without using array???