KeepItSimpleStupid
- Joined Mar 4, 2014
- 5,088
Computers MULTIPLY mistakes.
| Student Status | Score in Exam |
| Invalid score | less than 0 or greater than 100 (-1, 101) |
| Fail | 0-29 |
| Pass in Third Division | 30-44 |
| Pass in Second Division | 45-64 |
| Pass in First Division | 65- 74 |
| honours | 75- 100 |

The program stops after processing one score.I am posting my chart After verifying many times. I am confident that it will not be wrong
You're still only processing the first valid score.Now if the user enters the invalid number, then he will get a chance again until he enters the valid number.
So what is the problem, Once a valid score is found, only then the program will tell whether it is a fail or pass, and if its pass than which grade foundYou're still only processing the first valid score.
Follow your flow chart for a score of 5. How are you supposed go back to process another score? You have the same problem for any valid score. As soon as you categorize the score, you tell the program to stop.So what is the problem

It suppose to know the result of the student. Student can pass or can fail If one student fails, check the result of other student. If the student is pass, then find out which division is, then check the result of other student. do the same process for 500 students.Follow your flow chart for a score of 5. How are you supposed go back to process another score? You have the same problem for any valid score. As soon as you categorize the score, you tell the program to stop.
Your compare operations don't make sense.
The first compare operation in each decision element doesn't make sense.
For performance reasons, you want your code (the algorithm you write that mirrors the flowchart) to be effecient. As such, you don't want to ask question that no longer need answered. Any 'if' statement is a question. If you've already determined the answer based on the score, then you don't want to keep asking 'if' questions for other score values. You only ask questions if you don't yet know the answer.The condition in your flow chart is incomplete
This is my first flow chart but I have modified the conditions
View attachment 196252
My question is whether my flow chart follows the given table or not. If not then where it become fail?
Edit: The first priority is to make the correct the flow chart After that i can think of cleaning it as @MrChips said
The problem is that your flow chart will stop after processing the first valid score:If the student is pass, then find out which division is, then check the result of other student. do the same process for 500 students.

The problem is that your flow chart will stop after processing the first valid score:
You were totally right I was going on the wrong way. I was mistaking somewhere in thinking.Now, the task for TS is to draw the flow-chart for this.

MrChips Your chart looks good. I am sorry but can you tell me When my last flow chart won't work Because i don't think i am wrong somewhere logically. Where did you found wrong me except the stop box ?I gave you some tips in post #50. Did you follow it?
I used the word EXIT. I did not use STOP.
see post #55, that's why asked what's wrong with my flow chart. anyway I will try to make a clean flow chart like yoursI do not expect you to improve the flow-chart without further assistance.
#include<stdio.h>
#define student_size 500
int main()
{
int score, N;
for ( N = 0; N <student_size; N++)
{
do {
printf ("Enter : ");
scanf("%d", &score);
if ((score <0)||(score > 100))
printf("invalid \n");
}while ((score <0)||(score > 100));
if (score < 30) // range 0 to 100
printf("fail\n");
else if (score <45) //range 30 to 100
printf("third\n");
else if (score <65) // range 40 to 100
printf("second\n");
else if (score <75) //range 65 to 100
printf("first\n");
else // range 75 to 100
printf("honurs\n");
}
return 0;
}
Congrats on getting a working flow chart. Now you need to work on neatness. The preferred flow in a flow chart is left to right and top to bottom.My flow chart is working.