Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you answer fast ? pleaseeee Assignment Dear All Write a C program which rounds a given real number to a whole integer according to

image text in transcribedcan you answer fast ? pleaseeee

Assignment Dear All Write a C program which rounds a given real number to a whole integer according to the given rule. The program takes three numbers from the user, n1, n2 and n3.n1 represents decimal part, n2 represents floating point part of the number. n3 represents the number of zeros when it is rounded on the decimal part. Do not use type casting. Rounding RULE: A digit is larger than or equal to 5, the previous digit becomes incremented. If a digit is less than 5, the previous digit remains the same. e.g. 3456 278 2 (so the number is 3456.278 and n1=3456, n2=278, n3=2) Output is 3500 Input: 1442 3652 Output: 1400 Input: 1444 4472 Output: 1500

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

How does the Dodd- Frank Act affect the auditing profession?

Answered: 1 week ago

Question

=+how might their legitimacy be improved?

Answered: 1 week ago

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago