Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,518 members, 7,808,888 topics. Date: Thursday, 25 April 2024 at 06:40 PM

Pls Help Correct This Code - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Pls Help Correct This Code (826 Views)

Can Someone Kindly Help Me Correct This Error / 5,000 Naira For Someone Who Can Reverse This Code / Need Help With This Code (2) (3) (4)

(1) (Reply)

Pls Help Correct This Code by johnemone(m): 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)

Help How Can I Create This Type Of Tabled List / How Not Having A Website Is Affecting Your School Growth /

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.