Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 4E

Write a program that subtracts the value 1 from 8 and displays the result, together with an appropriate message, at the terminal.

Blurred answer
Students have asked these similar questions
Write a program that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average
Write a program that prompts the user to enter five test scores and then prints the average test score. Indicate the average test score by printing it to the terminal.  Average test score is X (Assume that the test scores are decimal numbers)
Write a program that reads from the user a number that represents its grade, and then displays a message to tell the user if he passed the exam (if the entered grade is greater than or equal to 60) or not (if the entered grade is less than 60). The entered grade should be a number between 0 and 100. Otherwise, the program displays an error message. Sample Run: Please enter your grade (between 0 and 100): 75 Congratulations! You have passed the exam. Please enter your grade (between 0 and 100) : 45.5 Unfortunately... You have not passed the exam. Please enter your grade (between 0 and 100) : 112 ERROR: You have entered a wrong grade!
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY