gradesssssssssssssssssssss

1 view
Skip to first unread message

KHALID RASOOL

unread,
Jan 2, 2012, 12:25:55 PM1/2/12
to Learn C Language
#include<stdio.h>
#include<conio.h>
void grade(char ch);
void main()
{
int i;
char ch;
for(i=0;i>0;i++)
{
ch=getch()
if(ch='\0')
{
break;
else;
}
grade(ch);
getch();
}
void grade(char ch);
{
if(ch='A')
{
printf("A is excellent");
}
if(ch='B')
{
printf(" well done");
}
if(ch='C')
{
printf("soo soo");
}
if(ch='D')
{
printf("not bad");
}
if(ch='E')
{
printf("invaliled data");
}
if(ch='F')
{
printf(" failllllllllll");
}
void main();

AHSAN YASIN

unread,
Jan 3, 2012, 12:58:11 AM1/3/12
to Learn C Language
ur program have 7 warnings (due to the use of only one ' = ' insted of
two ) and 7-8 errors so debuge them all
and also explain me why have u used " void main(); "
at the end
plz explain

Abdul Rehman TA of Sec A and B

unread,
Jan 3, 2012, 11:17:34 AM1/3/12
to Learn C Language
Wrong Code
Reply all
Reply to author
Forward
0 new messages