#include<stdio.h>
int main( int argc, char *argv[] )
{
int i , sum = 0;
float j;
for(i = 1; i < argc; i++ )
{
sum = sum + atoi(argv[i]);
}
j = (float)sum / (argc - 1);
printf("%.2f",j);
return 0;
int main( int argc, char *argv[] )
{
int i , sum = 0;
float j;
for(i = 1; i < argc; i++ )
{
sum = sum + atoi(argv[i]);
}
j = (float)sum / (argc - 1);
printf("%.2f",j);
return 0;
}
0 Comments