CODING:
#include<stdio.h>
#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c,d,e,ave;
float temp(float,float,float,float,float);
clrscr();
printf("\nEnter The Five Days Temperture:\n");
scanf("%f %f %f %f %f",&a,&b,&c,&d,&e);
ave=temp(a,b,c,d,e);
printf("\n A Average of Temperture:%f",ave);
getch();
}
float temp(float a,float b,float c,float d,float e)
{
return((a+b+c+d+e)/5);
}
OUTPUT:
#include<conio.h>
void main()
{
float a,b,c,d,e,ave;
float temp(float,float,float,float,float);
clrscr();
printf("\nEnter The Five Days Temperture:\n");
scanf("%f %f %f %f %f",&a,&b,&c,&d,&e);
ave=temp(a,b,c,d,e);
printf("\n A Average of Temperture:%f",ave);
getch();
}
float temp(float a,float b,float c,float d,float e)
{
return((a+b+c+d+e)/5);
}
OUTPUT:
Comments
Post a Comment