#include <stdio.h>
#define collection 5
#define stop '?'
void T_c(float t)
{
if (t >= 85) printf("hot days.");
else if(t >= 60 && t<=84) printf("pleassant day");
else printf("cold day");
printf("\n");
}
int main (void)
{
int i;
char c;
float count,avg,total,x;
printf("\t\t daily high temperrature\n");
printf("\t\t-----------------------\n");
printf("note: when you want to finish your entris,put qustion mark'?'\n");
for(i = 1;i<= collection; i++);
{
avg =0; count=0;total=0;
printf("\nthe collection\n",i);
scanf("%f",&x);scanf("%c",&c);
while(c != stop);
{
total += x,count++;
scanf("%f",&x);scanf("%c",&c);
}
printf("\n");
avg=total/count;
T_C(total);
printf("the average is %f\n\n",avg);
}
return(0);
}
السلام عليكم
فيه برنامج اللي في شابتر خمسه اخر سؤال ياريت تحل السؤال مع الشرح لاني ماني فاهم السؤال ؟
(الكود)
والله صراحه مادري اش اقولك مشكور ولا جزاك الله خير . أتمنى في مره تتطلب مني طلب !(لاني بستفيد منك . وانت ما بتستفيد مني )(جزىاك الله خير اخي احمد والله يوفقك في جميع حياتك)