0

Hi! I need your help!! My teacher wants us to create flowchart with this code from turbo c :

#include<stdio.h>
main()
{
int grade;
clrscr();
printf("Enter Grade:");
scanf("%d",&grade);
if(grade<=74 && grade>=70)
printf("Sorry, You Failed!");
else if(grade>=75 && grade<=100)
printf("Congratulations! You Passed!");
else if(grade>=101 && grade>=101)
printf("Invalid Grade");
else if(grade<=69&&grade<=69)
printf("Invalid Grade");
getch();
}

pls help me! I tried to draw a flowchart and when i passed it to my teacher, he gave it back to me because it s wrong.


and another one:

#include<stdio.h>
#include<conio.h>
int m;
main()
{
clrscr();
printf("Enter Number:");
scanf("%d",&m);
switch(m)
{
case 1:
printf("\nJanuary: 31 Days");

break;

case 2:
printf("\nFebruary: 28 Days");

break;

case 3:
printf("\nMarch: 31 Days");

break;

case 4:
printf("\nApril: 30 Days");

break;

case 5:
printf("\nMay: 31 Days");

break;

case 6:
printf("\nJune: 30 Days");

break;

case 7:
printf("\nJuly: 31 Days");

break;

case 8:
printf("\nAugust: 31 Days");

break;

case 9:
printf("\nSeptember: 31 days");

break;

case 10:
printf("\nOctober: 30 Days");

break;

case 11:
printf("\nNovember: 31 Days");

break;

case 12:
printf("\nDecember: 31 Days");

break;

default:
printf("\nMonth is not available");
}
getch();
}

so i really really need your help guys. :'( I don't have any idea how to do it correctly.

Advance thanks to all of you.

xoxo

Edited by Nick Evan: Added code-tags

4
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by BestJewSinceJC
0

So you first made the code and then made a flowchart ? How funny..

Anyway, show us the flowchart that you've made and we'll suggest some corrections

0

That is odd. Back when I was programming in college, you were not allowed to write any code until the flowcharts and pseudo-code were done. They also had to be approved by the teacher.

Edited by zortec: n/a

0

That is odd. Back when I was programming in college, you were not allowed to write any code until the flowcharts and pseudo-code were done. They also had to be approved by the teacher.

No shit. Just like you don't design the plumbing after the house has been built. Or something along those lines. lol.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.