Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to extract the fractional part of number input by the user, using the floor() function: fractional part =number - floor(number). For example,

image text in transcribed
Write a program to extract the fractional part of number input by the user, using the floor() function: fractional part =number - floor(number). For example, user inputs 3.5, then the program outputs the fractional part 3.5 - floor (3.5) = 3.5-3 = 0.5; and if the user inputs 7.1, then the program outputs the fractional part 7.1-floor (7.1) = 7.1-7 = 0.1. Write a program to perform rounding on a floating point number input by the user, based on the fractional part of the number. For example, if the user inputs 2.5, then the number to be output is 3; if the user inputs 7.7, then the output is 8; if the user inputs 11.4, then the output is 11. Draft a report for each of the questions after you complete the coding, including the problem description, source codes, discussion with the program output captured in screen shots, and conclusions about the lab Please upload the lab reports to ePortfolio

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

Step: 3

blur-text-image

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

2. Identify four types of migrant groups.

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago