Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 8, Problem 8.11HW
How many “hello” output lines does this
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Problem
Ask the user for a positive integer N, then output the number of even and odd digits of N. The program
should continuously ask input from the user until the user inputs a nonpositive integer (where the
program must exit).
Sample Run
Enter n: 100
Even digits: 2
Odd digits: 1
Enter n: 31
Even digits: 0
Odd digits: 2
Enter n: 4286
Even digits: 4
Odd digits: 0
Enter n: 1234567890
Even digits: 5
Odd digits: 5
Enter n: -15
Goodbye!
NOTE: You are not allowed to use string functions/operations, lists, tuples, dictionaries, or any
other non-scalar objects.
Write a program that accepts a number corresponding to a plane figure:
Right Triangle
Rectangle
Circle
The program will then ask for the following:
base and height – if the previous input is 1 (right triangle)
width and length – if the previous input is 2 (rectangle)
radius – if the previous input is 3 (circle)
(Use c++)
Create a program which gets an integer as input and reverses it. Use only arithmetic operations. For example: 12345 -> 54321. (in C language)
Chapter 8 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 8.2 - Prob. 8.1PPCh. 8.4 - Prob. 8.2PPCh. 8.4 - Prob. 8.3PPCh. 8.4 - Prob. 8.4PPCh. 8.4 - Practice Problem 8.5 (solution page 797) Write a...Ch. 8.4 - Practice Problem 8.6 (solution page 797) Write a...Ch. 8.5 - Practice Problem 8.7 (solution page 798) Write a...Ch. 8.5 - Prob. 8.8PPCh. 8 - Prob. 8.9HWCh. 8 - In this chapter, we have introduced some functions...
Ch. 8 - How many hello output lines does this program...Ch. 8 - How many "hello' output lines does this program...Ch. 8 - Prob. 8.13HWCh. 8 - How many hello output lines does this program...Ch. 8 - How many "hello lines does this program print?Ch. 8 - Prob. 8.16HWCh. 8 - Prob. 8.17HWCh. 8 - Consider the following program: Determine which of...Ch. 8 - How many lines of output does the following...Ch. 8 - Use execve to write a program called my1s whose...Ch. 8 - What are the possible output sequences from the...Ch. 8 - Write your own version of the Unix system function...Ch. 8 - One of your colleagues is thinking of using...Ch. 8 - Modify the program in Figure 8.18 so that the...Ch. 8 - Write a version of the fgets function, called...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
int[] collection = new int[-20];
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Why is the study of database technology important?
Database Concepts (7th Edition)
What is the difference between the names defined in an ML let construct from the variables declared in a C bloc...
Concepts of Programming Languages (11th Edition)
What is an object? What is a control?
Starting Out With Visual Basic (8th Edition)
Private Sub Handles btnOutput.Click
End Sub
Introduction To Programming Using Visual Basic (11th Edition)
The words that make up a high-level programming language are called______. a. binary instructions b. mnemonics ...
Starting out with Visual C# (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
- Task 9 Write a Python code for the following: • Ask the user to enter a Number, N • Display the summation of multiples of 7 up to that number (from 1 to N inclusive) Example01: Input: 50 Output: 196 Explanation: 7+ 14 + 21 + 28 + 35 + 42 + 49 = 196arrow_forwardStudents in the BIT level 300 class optained various grades in a Mid sem exam. A computer program is needed to find the highest and lowest class score. Write down the input and output to solve the above problemarrow_forwardLAB WORK Write a Perl language program to find the smallest number among the 3 user entered numbers. for example:- Input: 45, 96, 102 Output: 45arrow_forward
- Using SPIM, write and test a program that reads in a positive integer using the SPIM system calls. If the integer is not positive, the program should terminate with the message “Invalid Entry”; otherwise the program should print out the names of the digits of the integers, delimited by exactly one space. For example, if the user entered “728,” the output would be “Seven Two Eight.”arrow_forwardPython Write a program to take a number from user and calculate its 1/4 root and print the output The number is floating typearrow_forwardPlease fix the errors in this programarrow_forward
- 2. Write a program to print the following pattern. Ask the user to specify the number of lines: 1. 123 12345 when number of lines-5 1234567 123456789arrow_forwardRead floating-point numbers from input until a floating-point number is read that is not in the range -45.0 to 15.0, both exclusive. For each floating-point number read that is in the given range, output the floating-point number followed by " is accepted". Then, output the floating-point number read that causes the reading to stop followed by " is rejected". End each output with a newline. Ex: If the input is -41.6 -37.8 -35.5 -38.4 -42.3 -49.5 -36.9 -41.1, then the output is: -41.6 is accepted -37.8 is accepted -35.5 is accepted -38.4 is accepted -42.3 is accepted -49.5 is rejected 1 #include 2 using namespace std; 3 4 int main() { 5 167899 10} double dataValue; /* Your code goes here */ return 0;arrow_forwardWrite a program from decimal to any base, ask the user for a decimal number and convert entered base by user. (Your program should support bases between 2 and 16 .)arrow_forward
- PROBLEM:Write a program that prompts the user to input first name, middle initial, and last name (in upper case) for an ID card. There is a 22-character limit that also includes spaces in between the names on the ID card. The following conditions/limitations are observed: A. If the first name, second name, middle initial, and last name exceed the character limit, use the first name initial and last name. B. If the last name’s character count is greater than or equal to the character limit, omit the second name and middle initial. Use the first name initial and truncate the last name to fit the character limit. C. The spaces in between the first name, second name, middle initial, and last name should not be included in the input. D. If there is no second name or middle initial, input 0. E. Omit any space in the last name, e.g., DE GUZMAN will be DEGUZMAN.arrow_forward• Write a program that will compute for the radius of a circle given its circumference. Estimate the value of Pi = 3.1415. The output should display decimal numbers (using float data type). • Choose options for repetitions: Groups 1-3: Based on answer to repeat process: Yes/Noarrow_forwardWrite a program that reads in two integers and determines and prints whetherthe first is a multiple of the second. [Hint: Use the remainder operator.]arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Introduction to Operators in C; Author: Neso Academy;https://www.youtube.com/watch?v=50Pb27JoUrw;License: Standard YouTube License, CC-BY