Ask your own question, for FREE!
Mathematics 17 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!
Latest Questions
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
4 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
7 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
7 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
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!