Concept explainers
Write a
Degrees_C = 5(Degrees_F- 32)/9
Degrees_F- (9 (Degrees_C) /5) + 32)
Prompt the user to enter a temperature and either a C or c for Celsius or an F or f for Fahrenheit. Convert the temperature to Fahrenheit if Celsius is entered, or to Celsius if Fahrenheit is entered. Display the result in a readable format. If anything other than C, c, F, or f is entered, print an error message and stop.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Additional Engineering Textbook Solutions
Starting Out with Python (3rd Edition)
Starting Out With Visual Basic (8th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
- Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2/2a Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared and displays the minimum runway length.arrow_forwardMeadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. So far everything is right but something in my equations is causing my ouput to show up as 45.0arrow_forwardMeadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. write a program that calculates the following: The program calculates the cost of 12 egss The program calculates the cost of 35 eggs The program calculates the cost of 6 eggs JAVA import java.util.Scanner; class Eggs { public static void main(String[] args) { // Write your code here } }arrow_forward
- Write a program that prompts the user to enter an integer between1 and 12 and then displays the name of the month that corresponds to the integerentered by the user. For example, if the user enters three, the program shoulddisplay March.arrow_forwardFor pyhton: Write a program to prompt the user for hours and rate per hour to compute gross pay. Write your pay computation to give the employee 1.5 times the hourly rate for hours worked above 40 hours. Enter Hours: 45 Enter Rate: 10 Pay: 475.0 475 = 40 * 10 + 5 * 15 Run your code with two different numbers and put the results at the end of your code as a multi-line comment. ''' Your result '''arrow_forwardGiven 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_forward
- please write a code for thatarrow_forwardWelcome to the temperature conversion program. Please enter a the sample temperature in Degrees Kelvin:> 345Do you wish to convert the temperature to (c) for Celsius, or (f) for Fahrenheit:>cThe water is in a liquid state at 72.0 degrees celsius. Do you wish to enter another temperature? (Y for yes, N for no):> y Please enter a the sample temperature in Degrees Kelvin:> 234Do you wish to convert the temperature to (c) for Celsius, or (f) for Fahrenheit:>FThe water is in a solid state at -38.2 degrees fahrenheit. Do you wish to enter another temperature? (Y for yes, N for no):> Step 1 Convert kelvin into Celsius KelvinTemp − 273.15 = -273.1°C Convert kelvin into Fahrenheit FaherenheitTemp = (kelvinTemp- 273.15) * (9/5) + 32) Phases based on the temperature in Liquid, Solid, and Gaseous state state celsiusTemp FahreheitTemp gas(water vapor) >100 degree > 212 degree solid <0 degree <32 degree liquid other temperature other temperatures…arrow_forwardusing py3arrow_forward
- Given an airplane’s acceleration a and take-offspeed v, you can compute the minimum runway length needed for an airplane totake off using the following formula:length =v2/2aWrite a program that prompts the user to enter v in meters/second (m/s) and theacceleration a in meters/second squared (m/s2), then, displays the minimum runwaylength. Here is a sample run: Enter speed and acceleration: 60 3.5The minimum runway length for this airplane is 514.286arrow_forwardHELP ME WRITE THIS CODEarrow_forwardAirline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderarrow_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