![Programming in C](https://www.bartleby.com/isbn_cover_images/9780321776419/9780321776419_largeCoverImage.gif)
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
![Check Mark](/static/check-mark.png)
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
Using the MATLAB editor, create a script m-file which includes a header block and comments:
Utilizing the ideal gas law:
Calculate the molecular volume where:
R = 0.08206 L-atm/(mol-K)
P = 10.15 atm
T = 270-315 K in 5 degree increments
Display the results using the disp function with headers for variable and units.
Display the values of T in the first column and Vmol in the second column.
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.
please don't change variable names
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
- (Desk check) Determine the output produced by the following program: includeiostreamusingnamespacestd;intmain()inti,j,val[3][4]={8,16,9,52,3,15,27,6,14,25,2,10};for( i=0;i3;++i)for( j=0;j4;++j)coutval[i][j];return0;arrow_forward(Modify) a. Modify the program you wrote for Exercise 7 to provide the mass of a person as an output, given his or her weight as an input to the program. Use your program to determine the mass of a person who weighs 140 lbf on Earth. b. Modify the program written for Exercise 7a to also output the person’s weight on Mars and the moon. The pull of gravity on Mars is 12.54ft/sec2=3.728m/s2,andonthemoonis5.33ft/sec2=1.625m/s2.arrow_forwardPlease use python to calculate student's letter grades(A, A+, B, B+, C, C+) based on quizzes, homework, midterm, and final obtain marks. Please use more than 5 functions including loop, list, if, for, function. (Please include Psedocode and flow chart). Thank You!arrow_forward
- PYTHONarrow_forwardQ9arrow_forwardC- Filip Mirko has a younger brother, Filip, who just started going to school and is having trouble with numbers. To help him get the hang of the number scale, his teacher writes two three-digit numbers. She asks Filip to compare those numbers, but instead of interpreting them with the leftmost most significant digit, he needs to interpret them the other way around, with the most significant digit being the rightmost one. He then has to tell the teacher the larger of the two numbers. Write a program that will check Filip's answers. Input The first and only line of input contains two three-digit numbers, A and B. A and B will not be equal and will not contain any zeroes. Output The first and only line of output should contain the larger of the numbers in the input, compared as described in the task. The number should be written reversed, to display to Filip how he should read it. Sample Input 1 Sample Output i 734 893 437 Activate Warrow_forward
- Compute the average and print the standard deviation of four scores. The standard deviation is defined to be the square root of the average of four scores where a is the average of the four values (Si – a)2 where a is the average of the four scores of s1, s2, s3, and s4.arrow_forwardType in C Make sure the student ID shows for each line please.arrow_forwardwith explanations pleasearrow_forward
- Convert the octal NUMBER 1600. 5216 to hexadecimal number showing the steps (Note : The problem should be solved in separate paper with steps and scanned copy should be submitted along with other answers Final answer must be entered in the boxes provided below. For Hexadecimal digits from A to F, enter their equivalent decimal value in the corresponding box; do not enter the letter (For eg- for A, write 10, for B write 11 etc); Enter only one digit in each box. If there is any unused box, fill it with 0 -do not leave it blank) In the written submission, use the letters A to F for hex digits instead of the values) Integer part = Fractional part =arrow_forwardLaramie Park District has files of participants in its summer and winter programs this year. Each file is in participant ID number order and contains additional fields for first name, last name, age, and class taken (for example, Beginning Swimming). Design the logic for a program by using pseudocode or a flowchart that merges the files for summer and winter programs to create a list of the first and last names of all participants for the year in ID number order.arrow_forwardPlease do this in Python Programming and provide screenshots The output should be exact same like in the examples. If the output in the example is in 2 decimals, then it should be like that. 1e - Othello 2 During a game of Othello, the time a player spends thinking about his moves is recorded. Write a program that reads the times that the two players have thought, in milliseconds. One of the players is human, the other is a computer. The program determines which of the two players is human and prints the thinking time of the human in the following format: hh:mm:ss. It may be assumed that a computer always has less thinking time than a human. Example: Enter the time the black player thought: 21363Enter the time the white player thought: 36The time the human player has spent thinking is: 00:00:21. Put your program in othello_2.py => The following assignments use loops. Use the right loop for the right assignment. 1f - Manny Mobster Manny thinks he has found the perfect…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
![Text book image](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
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