Algorithm
Step 1: StartStep 2: Input a,b,c
Step 3: Sum=a+b+c
Step 4: Average=sum/3
Step 5: Print Sum and Average
Flowchart
C-Program
#includeint main()
{
int a,b,c,sum;
float avg;
printf("Enter three number:");
scanf("%d%d%d",&a,&b,&c);
sum=a+b+c;
avg=(float)sum/3;
printf("Sum is:%d\n",sum);
printf("Average is:%f",avg);
getch();
}
0 Comments