Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 15, Problem 1E
Type in and run the three programs presented in this chapter. Compare the output produced by each
Expert Solution & Answer
Explanation of Solution
Program 15.2:
Purpose of the program:
- The purpose of the program is to display many calculations with a single floating point number.
- The program performs operations like, finding half of the given value, square of the given value and cube of the given value.
Sample Output
Your number is 6.50
Half of it is 3.25
Square it to get 42.25
Cube it to get 274.63
Comparison:
The program “15.2” runs successfully and produces the output as it is given in the text book.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Read the following program and answer the questions given at the end.
Please program according to the given guidelines in the question only
Problem 1:
Design an algorithm/flowchart using Raptor that displays the product of first n even numbers.
Submit raptor files along with your report. Your report should include the screenshot of your
flowchart including sample input and output.
Chapter 15 Solutions
Programming in C
Ch. 15 - Type in and run the three programs presented in...Ch. 15 - Prob. 2ECh. 15 - Write a program to copy one file to another,...Ch. 15 - Write a program that merges lines alternately from...Ch. 15 - Write a program that writes columns m through n of...Ch. 15 - Write a program that displays the contents of a...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Assume the file input.txt contains the following characters: What will the following program display on the scr...
Starting Out with C++: Early Objects (9th Edition)
What would be the output in Self-Test Exercise 5 if the assignment were changed to the following? intextra=0;
Absolute Java (6th Edition)
The spreadsheet in Microsoft Excel file Ch01Ex01_U10e.xlsx contains records of employee activity on special pro...
Using MIS (10th Edition)
The process of opening a file is only necessary with input files. Output files are automatically opened when da...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
For this exercise, we will examine the code generated by GCC for functions that have structures as arguments an...
Computer Systems: A Programmer's Perspective (3rd Edition)
What is a ToolTip?
Starting Out With Visual Basic (7th Edition)
Knowledge Booster
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
- : Animating a Plot Problem: The MATLAB code with the initial conditions and one dimensional motion equation are given in the MProject2_Assignment1_base.m file. Modify the code to explore how to animate the plot, use functions to create plot functionarrow_forwardPlease fix the errors in this programarrow_forwardSolve the part b in accordance with the program given make whatever changes or omissions are required paste the screenshot of program and outputarrow_forward
- Matlab Application. Suppose that x, y, and z are the last 3 digits of your student number. 2020151955, the last 3 digits are 955 Write a script to declare your x, y and z: paste your script on the space provided below:arrow_forwardQuestion : By using Python Google Colab Programming Language, Experiment trials input text file is given below from which you have to answer. Calculate the median reaction time of all 75 trials. Calculate the % of ‘match’ trials in the first half of trials with reaction time less than or equal to the median reaction time. Next, calculate the % of ‘match’ trials in the second half of trials with reaction time greater than the median reaction time. Report both percentages. Based on a comparison of the two ‘match’ percentages what can be concluded about the relationship between the ‘match’ % and reaction time in your experimental data? Please share screenshot of code as well Output. Text.txt File Data is given Below. Please save it as Text.txt file name or You can Download it from this link sendanywhe.re/XXJ3M068 : 1 1 0 1 0 0 0 3000 3 8 8 01 2 0 1 0 0 0 3000 2 2 2 81 3 0 1 0 0 0 3000 3 3 3 21 4 0 1 0 0 0 3000 2 1 1 31 5 0 1 0 0 0 3000 2 11 11 11 6 1 1 1 0 0 469 1 1 1 111…arrow_forwardModify the program I created in the first picture for the question 1)arrow_forward
- Please explain the the program each line.arrow_forwardUSE PYTHON PLEASE (give the same output as the instruction given) Program Specifications Write a program to calculate a course grade given points for homework, quizzes, practice question, and Survey. Grades are calculated differently for undergrads, grads and distance learners.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 1 Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, Practice score, and Survey score. Calculate each category's average using maximum points for homework (800), quizzes (400), Practice question (150), and Survey (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two…arrow_forwardWhat do parentheses do in mathematical equations? a. Ensure addition functions are performed before subtraction functions b. Ensure multiplication functions are performed before division functions c. Ensure multiplication functions are performed before addition functions d. Ensure that whatever operation is inside the parentheses is performed firstarrow_forward
- For each of the programs below, in the blank in the code below so that it prints out "decode". If this is not possible instead write "Not Possiblearrow_forwardPLEASE USE PYTHON PLEASE (give the same output as the instruction given) Program Specifications Write a program to calculate a course grade given points for homework, quizzes, Survey, and Pratice question Grades are calculated differently for undergrads, grads and distance learners.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 1 Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, Survey, and Practice question score. Calculate each category's average using maximum points for homework (800), quizzes (400), Survey(150), and Practice question (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to…arrow_forwardThe Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient's first and last name, home address, and birth year. The records are sorted in ascending birth year order. Two doctors, Dr. Best and Dr. Cushing, have formed a partnership.a. Design the logic that produces a merged list of patients' names in ascending order by birth year. (flowchart or pseudocode)b. Modify the program so that it does not display patients' names, but only produces a count of the number of patients born each year. (flowchart or pseudocode)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Introduction to Operators in C; Author: Neso Academy;https://www.youtube.com/watch?v=50Pb27JoUrw;License: Standard YouTube License, CC-BY