Add, multiply and rate with a range of numbers
#include <stdio.h>
int main(void) {
int i,n,t[n],s,p,r;
printf("how many number do you want to calculate each sum and product? :");
scanf("%d",&n);
for (i=0;i<n;i++){
printf("enter the %d number :",i+1);
scanf("%d",&t[i]);
}
s=0;
p=1;
for (i=0;i<n;i++){
s= s+t[i];
p=p*t[i];
r=s/n;
}
printf("The sum of the numbers is : %d\n",s);
printf("The result of multiplying numbers : %d\n",p);
printf("The rate of this setting is : %d\n",r);
return 0;
}