Programming and Problem Solving With C++
Programming and Problem Solving With C++
6th Edition
ISBN: 9781449694265
Author: Nell Dale
Publisher: Jones & Bartlett Learning
bartleby

Videos

Question
Book Icon
Chapter 4, Problem 7PP
Program Plan Intro

Program Plan:

  1. double type percentage and S variable declared.
  2. double type R and pi variable declared and initialized as constant.
  3. coutis used to display information on screen.
  4. main() is used to perform all task.

Program Description:

To write a program that take percentage as input and output surface area of that portion of moon.

Blurred answer
Students have asked these similar questions
write a program in C++ that A user needs to determine the size of squares (let say delta) in a grid, the center of the circle (does not have to lie on a grid but it can!) and the radius. (for example use "cin>>" )   Then you need to plot a circle using parametric equations of circle (you need to increase angle and plot these (in my picture black) points). First plot the first point of the circle and determine in which square of grid it is. (in my picture it is an orange square) and plot the left bottom vertex of this square (in my picture it is a blue point). Then increase an angle and plot next point of circle - check if it lies in different square. -If it is not in different square, you need to increase angle and check again. (because an angle was too small) -If it is the different square, then check, if this square has THE COMMON EDGE with the previous one -> if it has the common edge, then print new left bottom vertex of this square (if does not have common edge,…
Write a C++ program that generates a plate number based on the user’s answer to the following questions: 1.     What is your favorite color of the rainbow (ROYGBIV)?  a.     Use the first letter of the chosen color as the first character of the plate number. b.     Display “Invalid Input” and ask the user to re-enter his/her answer if the answer is not a valid color of the rainbow. 2.     What is your month of birth? a.     Use the last letter of the month as the second character of the plate number. b.     Display “Invalid Input” and ask the user to re-enter his/her answer if the answer is not a valid month. 3.     What is your first name? a.     Use the third letter of the first name as the third character of the plate number. No need to include the second name if you have a second name. Make sure to use “cout” and “cin” to collect the necessary inputs from the user. For the number section: 1.     Ask the user his/her age and use the age as the first and second digits of the plate…
Write a C program that calculates the price of a pizza and prints the receipt as follows: 1- Your program should first ask the user to enter the size of the pizza (integer value 1=large, 2=medium, 3=small) as well as the number of toppings (integer). 2- Your program should then read the pizza basic price (double) as well as the price of a topping ( float ) from the user. 3- Your program should then calculate the total price of the pizza using the following formula: Total price = ( basic price + number of toppings * topping price ) / size; And print a receipt which displays the details of your pizza order as well as the final total price to the screen
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
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Algebraic Expressions – Algebra Basics; Author: TabletClass Math;https://www.youtube.com/watch?v=U-7nq7OG18s;License: Standard YouTube License, CC-BY
Python Tutorial for Beginners 3 - Basic Math, Mathematical Operators and Python Expressions; Author: ProgrammingKnowledge;https://www.youtube.com/watch?v=Os4gZUI1ZlM;License: Standard Youtube License