Write a C program to print the average of three numbers by taking input from user
Hi aspirant,
Following below is the C code for the mentioned scenario:
#include<stdio.h>
int main(){
float a,b,c,average;
scanf("%f%f%f",&a,&b,&c);
average=(a+b+c)/3;
printf("%.2f",average);
return 0;
}
Hope it helps!!