Computer Science: A Structured Programming Approach Using C, Third Edition
Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
bartleby

Videos

Question
Book Icon
Chapter 4, Problem 38PS
Program Plan Intro

To create a program that reads a floating-point value and prints the floor, rounded , and ceiling value.

Program Plan:

The program should be written in C programming that reads a floating-point value and prints the floor, rounded, and ceiling value. Also, the program should be tested using the same values as in Problem 37.

Blurred answer
Students have asked these similar questions
a. Write a function named countDigits that accepts a positive integer as its parameter and returns the number of digits in that number. For example, the number 8546587 has seven digits, so the call countDigits(8546587) should return 7. You may assume that the value passed to your method is non-negative. b. Write a program to input an integer n and call the above function in part a if n is positive, else give 'Value must be Positive' message. Inputting will stop when 0 is entered.
Modify the program so that it does the following: Performs a function that gets the area of a rectangle. The function must receive two parameters (decimal numbers) that represent the base and height of the rectangle and must return the calculated value (decimal number). Perform a second function that obtains the total area of a rectangular prism with a rectangular base. The total area of such a prism is equal to the sum of the areas of each of its faces. It uses calls to the previous function for this calculation. Call this last function in the main with user data. Execution example Give me the base: 21.3 Give me the height: 10 Give me the depth: 2.0 The total area of the prism is: 551.2
Write a function that takes a positive integer num and calculates how many dots exist in a pentagonal shape around the center dot on the Nth iteration. In the image below you can see the first iteration is only a single dot. On the second, there are 6 dots. On the third, there are 16 dots, and on the fourth there are 31 dots. Return the number of dots that exist in the whole pentagon on the Nth iteration. Examples pentagonal (1) → 1 pentagonal (2) <-6 pentagonal (3) - 16 pentagonal (8) → 141

Chapter 4 Solutions

Computer Science: A Structured Programming Approach Using C, Third Edition

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Computer Programming for Beginners | Functions, Parameters & Arguments | Ep24; Author: Programming With Avelx;https://www.youtube.com/watch?v=VXlh-qJpfw0;License: Standard YouTube License, CC-BY