C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 3, Problem 3.14E
Formulate a pseudocode
- Obtain two numbers from the keyboard, compute their sum and display the result.
- Obtain two numbers from the keyboard, and determine arid display which (if either) is the larger of the two numbers.
- Obtain a series of positive numbers from the keyboard, and determine and display their sum. Assume that the user types the sentinel value -1 to indicate “end of data entry.”
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Formulate a pseudocode algorithm for each of the following:a) Obtain two numbers from the keyboard, compute their sum and display the result.b) Obtain two numbers from the keyboard, and determine and display which (if either) isthe larger of the two numbers.c) Obtain a series of positive numbers from the keyboard, and determine and display theirsum. Assume that the user types the sentinel value -1 to indicate “end of data entry.”
In Java Language
Formulate a pseudocode algorithm for each of the following:
1-- Obtain two numbers from the keyboard, compute their sum and display the result.
2-- Obtain two numbers from the keyboard, and determine and display which (if either) of the two numbers is the larger.
3-- Obtain a series of positive numbers from the keyboard and determine and display their sum. Assume that the user types the sentinel value -1 to indicate “end of data entry.”
3. Pseudocode, Algorithm & Flowchart to convert temperature from Fahrenheit to CelsiusC : temperature in CelsiusF : temperature Fahrenheit4. Pseudocode, Algorithm & Flowchart to find Area and Perimeter of SquareL : Side Length of SquareA : Area of SquareP : Perimeter of Square
Chapter 3 Solutions
C How to Program (8th Edition)
Ch. 3 - Indentify and correct the errors in each of the...Ch. 3 - Fill in the blanks in each of the following: The...Ch. 3 - Prob. 3.12ECh. 3 - Write a single pseudocode statement that indicates...Ch. 3 - Formulate a pseudocode algorithm for each of the...Ch. 3 - State which of the following are true and which...Ch. 3 - For Exercises 3.16-3.20, perform each of these...Ch. 3 - For Exercises 3.16 -3.20, perform each of these...Ch. 3 - (Sales-Commission Calculator) One large chemical...Ch. 3 - (Interest Calculator) The simple interest on a...
Ch. 3 - (Salary Calculator) Develop a program that will...Ch. 3 - (Predecrementing vs. Postdecrementing)Write a...Ch. 3 - (Printing Numbers from a Loop) Write a program...Ch. 3 - (Find the Largest Number) The process of finding...Ch. 3 - (Tabular Output) Write a program that uses looping...Ch. 3 - (Tabular Output) Write a program that utilizes...Ch. 3 - (Find the Two Largest Numbers) Using an approach...Ch. 3 - (Validating User Input) Modify the program in...Ch. 3 - Prob. 3.28ECh. 3 - Prob. 3.29ECh. 3 - (Dangling-Else Problem) Determine the output for...Ch. 3 - (Another Dangling-Else Problem) Modify the...Ch. 3 - Prob. 3.32ECh. 3 - (Hollow Square of Asterisks) Modify the program...Ch. 3 - (Palindrome Tester) A palindrome is a number or a...Ch. 3 - (Printing the Decimal Equivalent of a Binary...Ch. 3 - (How Fast Is Your Computer?) How can you determine...Ch. 3 - (Detecting Multiples of 10) Write a program that...Ch. 3 - (Counting 7s) Write a program that reads an...Ch. 3 - (Checkerboard Pattern of Asterisks) Write a...Ch. 3 - (Multiples of 2 with an Infinite Loop) Write a...Ch. 3 - (Diameter, Circumference and Area of a Cirle)...Ch. 3 - Whats wrong with the following statement? Rewrite...Ch. 3 - (Sides of a Triangle) Write a program that reads...Ch. 3 - (Sides of a Right Triangle) Write a program that...Ch. 3 - (Factorial) The factorial of a nonnegative integer...Ch. 3 - (World-Population-Growth Calculator) Use the web...Ch. 3 - (Target-Heart-Rate Calculator) While exercising,...Ch. 3 - (Enforcing Privacy with Cryptography) The...
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
Why is the study of database technology important?
Database Concepts (8th Edition)
To use cout statements you must include the _____ file in your program.
Starting Out with C++: Early Objects (9th Edition)
What are the six common steps needed to access databases from a typical program?
Modern Database Management (12th Edition)
A ________ is a small window that displays information and allows the user to perform actions. a. menu b. confi...
Starting Out with Python (4th Edition)
How are relationships between tables expressed in a relational database?
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
- Please locate and identify at least 9 problems in the following code. Explain how to fix them or why they are an error. Use the line numbers in your answers. change == input(“Please enter amount of change in your pocket, using format 0.53 : “) if change = 0: print('Your pockets are empty!!\n” elif change >= 1: print(“You have over a dollar!!, change, '\n') else change < 0: print(“You have “, change. “ in your pocket” )arrow_forwardplease use pseudocode to answer the following question Two students challenge each other to a basketball shootout. They agree to limit the number of attempts to 3 throws each. The game will be constructed in two sessions where the first student will make all 3 attempts followed by the second student. The student who makes the most baskets (gets the ball in the hoop) will be declared the winner. In the case of a tie, the game will be repeated until a winner can be determined.arrow_forwardwrite the pseudocode solution of the following exercises: a. Read two numbers, multiply them together and print out their product. b. Ask the user for a distance in miles and convert it to kilometers. Display the result (1 mile = 1.6 kilometers). c. Ask the user for his/her birth date and calculate and display the age of the user. d. Perform the following: i. Read in 5 separate numbers. ii. Calculate the average of the five numbers.arrow_forward
- Input a number (sequence number to be considered) from the console and calculate the Fibonacci series up tothat sequence and display the output on the screen. The code should check whether user types any negative number. If yes, it shows an error message andprompts again for input. Code should run without any error using SASM IDE. The code is able to calculate up to 25th Fibonacci number in the series. Consider the first two numbers are 0and 1. Required to use recursive function to calculate the final output number. For/ While loop to calculatethe Fibonacci series will not be considered. The result (only a number, do not need to show the series) should display on the screen, can use printf command or PRINT_DEC and PRINT_STRING command to show the output. The code should include adequate comments for the written assembly code.arrow_forwardDesign an algorithm that will prompt a terminal operator for three characters, accept those characters as input, sort them into descending sequence and output them to the screen. The algorithm is to continue to read characters until ´E N D` is entered. use PSEDUCODEarrow_forwardComputer Science Write a program that fulfills following requirements: a. Read two hexadecimal numbers from user. Each number should not be more than one bvte. b. Display sum and difference of both numbers in hexadecimal on consolearrow_forward
- Determine the output of the given program segment. Assume the following initialization: int a = 2, b = 4; if ( a > b||a – b < a ) { b - =a;cout<<b<<”=“<<b; } else { b++;cout<<b <<”=”<<b; }arrow_forward[1-Final] Instructions: What will be the output of the given program snippet (user-defined function)? *Display/output the character's ACII code only no need to display/output the message "ASCII code of character "__________" is equal to "__________. Note: ASCII code of A-Z is equal to 65 to 90 _______________, _______________, _______________, _______________, _______________, _______________, _______________, _______________,arrow_forwardDecimal x Decimal by CodeChum Admin Now that we're done with integers, we're moving on to decimals! Instructions: Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables. Multiply the 1st and 2nd decimal numbers, and store the product into a variable. Then, divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out its quotient.arrow_forward
- (Data processing) a. Write a program to display the following two prompts: Enter a month (use a 1 for Jan, etc.): Enter a day of the month: Have your program accept and store a number in the variable month in response to the first prompt and accept and store a number in the variable day in response to the second prompt. If the month entered is not between 1 and 12, print a message informing the user that an invalid month has been entered. If the day entered is not between 1 and 31, print a message informing the user that an invalid day has been entered. b. What will your program do if the user enters a number with a decimal point for the month? How can you make sure your if statements check for an integer number? c. In a non-leap year, February has 28 days; the months January, March, May, July, August, October, and December have 31 days; and all other months have 30 days. Using this information, modify the program written in Exercise 3a to display a message when an invalid day is entered for a user-entered month. For this program, ignore leap years.arrow_forward(Thermodynamics) a. Design, write, compile, and run a program that determines the work,W, performed by a piston engine providing a force of 1000 N over a distance of 15 centimeters. The following formula is used to determine the work performed: W=Fd F is the force provided by the piston in Newtons. d is the distance the piston moves in meters. b. Manually check the values computed by your program. After verifying that your program is working correctly, modify it to determine the work performed by six pistons, each providing a force of 1500 N over a distance of 20 centimeters.arrow_forwardIdentify and correct the errors in each of the following. [Note: There may be more than oneerror in each piece of code.]a) if ( age >= 65 );puts( "Age is greater than or equal to 65" );elseputs( "Age is less than 65" );b) int x = 1, total;while ( x <= 10 ) {total += x;++x;}c) While ( x <= 100 )total += x;++x;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
Computational Software for Intelligent System Design; Author: Cadence Design Systems;https://www.youtube.com/watch?v=dLXZ6bM--j0;License: Standard Youtube License