#include <stdio.h>
int main() {
double total=0.0;
double input=0.0;
int num=0;
for( ; input>=0.0 ; )
{
total+=input;
printf("실수 입력(minus to quit) : ");
scanf("%lf", &input);
num++; // 1 2 3
}
printf("평균: %f \n", total/(num-1));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: