₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,106 members, 8,420,360 topics. Date: Thursday, 04 June 2026 at 05:31 PM

Toggle theme

Pls Help Correct This Code - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPls Help Correct This Code (915 Views)

1 Reply

Pls Help Correct This Code by johnemone(op): 10:57pm On May 28, 2013
pls i need help correcting dis code. it compiled bt nt running d way i expected it to be
#include<stdio.h>
#include<conio.h>

int main ()
{
char name;
int score;
printf("\nenter name:"wink;
scanf("%c",&name);
printf("\nenter score:"wink;
scanf("%d",&score);
if (score>='80')
printf("\n%c is fit",name);
else printf("\n%c is not fit",name);
return 0;
}
Re: Pls Help Correct This Code by Bossman(m): 7:51pm On May 30, 2013
Please be more specific. What do you mean by it's not running the way you expected it. Do you get the 2 prompts, do you get an error, or what?
Re: Pls Help Correct This Code by jacob05(m): 10:33pm On May 30, 2013
#include<stdio.h>
#include<conio.h>
int main ()
{
char name;
int score;
printf("\n Enter name: "wink ;
scanf("%c",&name);
printf("\n Enter score: " );
scanf("%d",&score);
if (score >= 80)
printf("\n %c is fit",name);
else printf("\n %c is not
fit",name);
return 0;
}


should run{not tested though}
1 Reply

Can Someone Kindly Help Me Correct This Error5,000 Naira For Someone Who Can Reverse This CodeNeed Help With This Code234

All Programmer, Novice/beginner AssembleHow To Recover A Hacked Yahoo AccountA Dice Program