Ask your own question, for FREE!
Mathematics 7 Online
OpenStudy (anonymous):

Some1 help me in Computer group plz!

OpenStudy (anonymous):

#include<stdio.h> #include<conio.h> int main(void) { int days; int exe; int total; int average; total=0; average=0; while(days<5){ printf("Enter your daily exercises solved no. : "); scanf("%d",&exe); total= total+exe; days=days+1; } average=total/5; printf("The average # of exercises for 3 days is %d",average); getch(); }

OpenStudy (anonymous):

what is wrong in this text as my compiler gives error?

OpenStudy (anonymous):

what error did you get?

OpenStudy (anonymous):

there appears direclty the 2nd last sentence that is "The average # of exercises for 3 days is 0"

OpenStudy (anonymous):

i got it!! : ) the error is in average=0, it must b days =0

OpenStudy (anonymous):

thanks Imran!!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!