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
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.
open file in python write in it list of months of the year from jan to dec and list of enter sales for each month then calculate the total and average and the min and max numbe and write list of sales to the file
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
In C++, _______ provide a convenient way to organize information into fields and records.
Starting Out with C++: Early Objects (9th Edition)
Why is it useful for a programmer to have some background in language design, even though he or she may never a...
Concepts Of Programming Languages
Referring back to Questions 3 of Section 2.3, if the machine used the pipeline technique discussed in the text,...
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
What does the following code print? System.out.println(""); System.out.println(""); System.out.println(""); Sys...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
What is a ToolTip?
Starting Out With Visual Basic (8th Edition)
59. A 100-watt [W] motor (60% efficient) is used to raise a 100-kilogram [kg] toad 5 meters [m] into the air. H...
Thinking Like an Engineer: An Active Learning Approach (4th 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
- Solve using c programming . Please show the code clearly with comments and also the console output imagearrow_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_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
- Given the following program segment:for (i) Write a while loop that has the same output. (ii) Write a do...while loop that has the same output.arrow_forward(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_forward
- * Aim : To convert temperature from °Celcius to °Fahrenheit and Kelvin scale. * Software Used : MATLABarrow_forwardopen file in python write in it list of months of the year from jan to dec and list of sales for each month then calculate the total and average and the min and max numberarrow_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
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