Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Rizaldo

  • 4 years ago

What is wrong in this text? My Codeblock compiler gives error!

  • This Question is Closed
  1. Rizaldo
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 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(); }

  2. Rizaldo
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

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

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy