ACP1_1

#include<stdio.h> float temp(float,float,float,float,float); void main() { float avg,temp1,temp2,temp3,temp4,temp5; clrscr(); printf("Enter temperature of 5 days : \n"); scanf("%f%f%f%f%f",&temp1,&temp2,&temp3,&temp4,&temp5); avg=temp(temp1,temp2,temp3,temp4,temp5); printf("\nAverage temperature is : %5.2f",avg); getch(); } float temp(float t1,float t2,float t3,float t4,float t5) { float avg; avg=(t1+t2+t3+t4+t5)/5; return avg; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.