A community for students.
Here's the question you clicked on:
 0 viewing
Rizaldo
 3 years ago
What is wrong in this text? My Codeblock compiler gives error!
Rizaldo
 3 years ago
What is wrong in this text? My Codeblock compiler gives error!

This Question is Closed

Rizaldo
 3 years ago
Best ResponseYou've already chosen the best response.1#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(); }

Rizaldo
 3 years ago
Best ResponseYou've already chosen the best response.1i got it!! : ) the error is in average=0, it must b days =0
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.