I need a program that repeatedly asks for a real number, and then rounds it and output the rounded number as an integer. and it stops asking for real numbers when input 3.14
needhelpe -5 Newbie Poster
Recommended Answers
Jump to Posthey I need help. I made one code but doesn't work!!!
Can we see what you have done so far?
Jump to PostMost things in programming shouldn't start with an uppercase letter (at least in C anyway)
data types are lowercase and so is printf
Also you have redeclaration of b. And you use b and B interchangeable which you can't do.
This whole code is really a mess. You need to …
Jump to Postneedhelpe> yes I know that. but how can I make it work?
A loop is needed to continuously repeat the question until the stop signal (3.14) is reached.If I would want to ask for a digital until the number five is entered I could write it like this:
…
All 13 Replies
Tom Gunn 1,164 Practically a Master Poster
needhelpe -5 Newbie Poster
Tom Gunn 1,164 Practically a Master Poster
Aia 1,977 Nearly a Posting Maven
needhelpe -5 Newbie Poster
Grn Xtrm 84 Posting Pro in Training
needhelpe -5 Newbie Poster
Grn Xtrm 84 Posting Pro in Training
Grn Xtrm 84 Posting Pro in Training
Aia 1,977 Nearly a Posting Maven
needhelpe -5 Newbie Poster
Grn Xtrm 84 Posting Pro in Training
Dave Sinkula 2,398 long time no c Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.