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 7, Problem 1E
Type in and run the 17 programs presented in this chapter. Compare the output produced by each
Expert Solution & Answer
Explanation of Solution
Program 7.1:
Purpose of the program:
- The purpose of the program is write a function in “C”.
- The “printMessage()” function is defined outside the main and it has a print statement.
- The “printMessage()” function is called inside main function.
Sample Output
Programming is fun.
Comparison:
The program “7.1” 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
please code in python
question in image
11. Given the coefficients of a 1st degree linear function, please draw its graph. Use macros
or procedures to separate the code.
by using lists
Please Write Python program design at the beginning of program:define the purpose, Input /output data and Algorithm
and please write the program testing ( for cases that could happen) and write comments in each steps
Chapter 7 Solutions
Programming in C
Ch. 7 - Type in and run the 17 programs presented in this...Ch. 7 - Prob. 2ECh. 7 - Modify Program 7.8 so that the value of e is...Ch. 7 - Modify Program 7.8 so that the value of g is...Ch. 7 - Prob. 6ECh. 7 - Write a function that raises an integer to a...Ch. 7 - Prob. 8ECh. 7 - The least common multiple (1cm) of two positive...Ch. 7 - Prob. 10ECh. 7 - Write a function called a that takes two...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Design a program that opens an output file with the external name my_name.dat, writes your name to the file, an...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
What is the distinction between application software and system software? Give an example of each.
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
_________ is when member functions in a class hierarchy behave differently, depending upon which object perform...
Starting Out with C++ from Control Structures to Objects (9th Edition)
A statement in one function can access a local variable in another function.
Starting Out with Python (4th Edition)
Porter’s competitive forces model: The model is used to provide a general view about the firms, the competitors...
Management Information Systems: Managing The Digital Firm (16th Edition)
Describe the three types of anomalies that can arise in a table and the negative consequences of each.
Modern Database Management
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
- (Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t, caused only by radiation, of each planet in the solar system. For convenience, this formula is repeated here (see Exercise 5 for a definition of each symbol): t=Nk2eAT3fin A=surfaceareaofasphere=4r2 N=numberofatoms=volumeofthespherevolumeofanatom Volume of a sphere sphere=43radius3 The volume of a single atom is approximately 11029m3 . Using this information and the current temperatures and radii listed in the following chart, determine the time it took each planet to cool to its current temperature, caused only by radiation.arrow_forwardProblem B Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…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
- Analysis of Wind Speed (Intermediate) You are required to develop a program which calculates the average wind speeds for four (4) different weeks in the month of May 2021 for the State of Kuala Lumpur. Suppose that the data of Table 1 is provided by the Malaysian Meteorological Agency. This table shows the wind speed data (km/h) reported in each day for each week and Figure 1 shows the sample output to be produced by the program: Table 1: Data for wind speeds reported in Kuala Lumpur for four weeks in May 2021 Week/Day 1 2 3 4 7 Week 1 8.2 10.3 9.8 11.0 10.4 9.1 16.8 Week 2 7.1 6.3 14.2 9.4 8.8 7.2 9.8 Week 3 6.7 8.2 5.4 6.1 7.0 12.4 11.3 Week 4 6.9 5.2 7.1 10.8 7.6 5.4 6.3 Day 1 2 3 4 5 6 7 Enter daily wind speeds reported for Week 1: 8.2 10.3 9.8 11.0 10.4 9.1 16.8 Enter daily wind speeds reported for Week 2: 7.1 6.3 14.2 9.4 8.8 7.2 9.8 Enter daily wind speeds reported for Week 3: 6.7 8.2 5.4 6.1 7.0 12.4 11.3 Enter daily wind speeds reported for Week 4: 6.9 5.2 7.1 10.8 7.6 5.4 6.3…arrow_forwardMatlab code with outputarrow_forwardProblem B. Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…arrow_forward
- PLEASE 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_forwardUse assembly language.arrow_forwardanswer for this using for looparrow_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
Computational Software for Intelligent System Design; Author: Cadence Design Systems;https://www.youtube.com/watch?v=dLXZ6bM--j0;License: Standard Youtube License