Concept explainers
The formula for converting centigrade temperatures to Fahrenheit is
Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
- Write a program that prompts the user to enter the month and first day of the month, and displays all the Sundays in that month. For example, if the user entered the month 7 for July, and the first day 4 for Wednesday, your program should display the following output:arrow_forwardA county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. If an acre of land is valued at $10,000, its assessment value is $6,000. The property tax is then 75¢ for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $45. Write a program that asks for the actual value of a piece of property and displays the assessment value and property tax.arrow_forwardWrite a pseudo code in which you ask the user to will enter a number and then enter 5 more numbers using the while statement to do this and in the end your program will show how much number were divisor by the number you enter at start. Also the program should terminate if the users enters a negative value at any stage. Enter a Number: 2Enter 1 Number: 4Enter 2 Number: 5Enter 3 Number: 6Enter 4 Number: 7Enter 5 Number: 8Total divisor are: 3arrow_forward
- a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is greater than 12 or less than 1, display an error message; otherwise, display the valid month with a message such as 3 is a valid month. b. Write a program named CheckM0nth2 that prompts a user to enter a birth month and day. Display an error message if the month is invalid (not I through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between I and 29 for February). If the month and day are valid, display them with a message.arrow_forwardWrite a Phyton program that computes the duration of a projectile’s flight and its height above the ground when it reaches the target. As part of your solution, you should display instructions to the program user. Relevant formula: time = distancevelocity xcos (θ) height = velocity xsin x time- g x time22 use the following variables: g = gravitational constant = 32.17 = angle of elevation in radian v = velocity or the projectile velocity (ft/sec) d= distance to target t = time of flight in seconds. h = height at impact Try your program on these data sets.arrow_forwardCreate a flowchart that will compute for the grade of students and print its equivalent grade point. The formula for computing the grade is : GRADE = 10% assignment + 20% seatwork + 30% quiz + 40% exam. Equivalent Grade point ---------------------- 1.0 - 99-100 1.25 - 96-98 1.50 - 93-95 1.75 - 90-92 2.0 - 87-89 2.25 - 84-86 2.50 - 81-83 2.75 - 78-80 3.0 - 75-77 5.0 - below 75arrow_forward
- A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $1 per hour for each hour or part thereof over four hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format, and should calculate and print the total of yesterday's receipts. The program should use the function calculate Charges to determine the charge for each customer.arrow_forwardWrite a program that asks the user to enter two numbers between 200 and 1000, inclusive. If any of the numbers entered is outside the range above, display the message "Invalid number" and exit the program using System.exit(0); If the numbers are within the range, add the two numbers together and display the result.arrow_forwardSolve this please: A mobile phone app allows a user to press a button that starts a timer that counts seconds. When the user presses the button again, the timer stops. Draw a flowchart or write pseudocode that accepts the elapsed time in seconds and displays the value in minutes and seconds. For example, if the elapsed time was 130 seconds, the output would be 2 minutes and 10 seconds.arrow_forward
- Given an airplane's acceleration and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula. length=v^2/2*a. write a program that prompts the user to enter V in meters and acceleration an in meter/second and display the minimum runway length.arrow_forwardWrite a program that changes a temperature reading from Fahrenheit to Celsius using the following formula: Celsius = (5/9) * (Fahrenheit – 32). The program should prompt the user to enter a Fahrenheit temperature. It then calculates the equivalent Celsius temperature and displays the results as shown below. Sample Output if Applicable C M:\CCS121GBU 143C0-1\EXER9.EXE Enter the temperature in Farenheit:56 Farenheit temperature is: 56.000000 Ce lsius tenperature is: 13.333333arrow_forwardAssuming that all residents are given the first 1000L of water for free by the municipality, then are charged R2.00 per litre thereafter. Write a program that will prompt the user to enter the amount of water used by a resident and then computes the amount to be paid. For example, if a resident uses 1200L, then the amount to be paid will be R400arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning