Write a program that prompts the user to input a number. The program should then output the number and a message saying whether the number is positive, negative, or zero.
Q: Write a program called celsius_to_fahrenheit which prompts the user for a Celsius temperature,…
A: Algorithm / Steps: User input for celsius temperature Converting celsius temp to Fahrenheit temp…
Q: Write a python program that asks the user to enter a temperature in Celsius. The program should…
A: Program Explanation: The variable to store the temperature is declared. Prompt the user to enter…
Q: Write a program that prompts the user to enter two integer numbers x and y. The program must check…
A: Since , their is no any specific language is mentioned for writing a program so program is written…
Q: Write a program that prompts the user to enter two positive integers less than 1,000,000,000 and the…
A: Program code: //include the required header files #include <iostream> using namespace std;…
Q: Write a program that prompts the user to enter an integer for today’s day of the week (Sunday is 0,…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: Write a program that will ask the user to enter an integer number and display the message ‘ Prime ‘…
A: Programming language is missing in the question. So we will answer this program in C++. If you want…
Q: Write a program that prompts the user to input an integer and then outputs both the individual…
A: Program plan: Include the necessary header files. in the main method declare the character array.…
Q: Write a program that prompts the user to enter a three-digit integer and determines whether it is a…
A: JAVA CODE IS GIVEN BELOW:
Q: Write a program that prompts the user to input a number. The program should then output the number…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per…
A: Program: //include the header file #include <iostream> using namespace std; //definition of…
Q: In a right triangle, the square of the length of one side is equal to the sum of the squares of the…
A: #include<iostream> #include<math.h> using namespace std; int main()…
Q: Write a program that accepts a number and determines whether the number is positive or negative. If…
A: Given: To write a code in C.
Q: • Write a program that prompts the user to input an integer and then outputs the number with the…
A: Note: As you have not mentioned any programming language, I am writing the program in the JAVA…
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a program that reads from the user a number that represents its grade, and then displays a…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that asks the user to enter a person’s age. The program should display a message…
A: Note: Below is the required program in the python language. Program Approach: Prompt the user for…
Q: In a right triangle, the square of the length of one side is equal to the sum of the squares of the…
A: Programming language is missing in the question. So we will answer this program in C++ language. If…
Q: Write a program that will ask the user to input a letter 'm' or 'f and then it will display "Hello…
A:
Q: Write a program that prompts the user to input a positive integer. It should then output a message…
A: Program to prompts the user to enter a positive integer. Calculate whether the number is a prime…
Q: Write a program that prompts the user to enter a telephone number expressed in letters and outputs…
A: #include<iostream> using namespace std; int main (){ string inputString, outputString;…
Q: Write a program that prompts the user to enter the year and first day of the year, and displays the…
A: PROGRAM CODE: import java.util.*;public class Main { public static void main(String[] strings)…
Q: Write a program that converts the input dollar to its peso exchange rate equivalent. Assume that…
A: Program: //include the required header file #include <iostream> using namespace std;…
Q: Write a program that prompts the user to enter a time in seconds over 500 and then displays that…
A: you did not mention any programming language so i am solving this in java 1 first we have to take…
Q: Write a program that accepts two characters and display the message “The characters are not the…
A: Lets see the solution.
Q: Write a program that prompts the user to input a positive integer. It should then output a message…
A: Given The condition of a prime number and to do a program to check given number is prime or not.
Q: Write a program that prompts the user to enter the weight of a person in kilograms and outputs the…
A: To solve the given problem, first we need to read weight in kilogram, then use the relation: 1…
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Programming Language => C++ I have provided C++ CODE along with CODE SCREENSHOT and…
Q: *Write a program that asks the user to guess your favorite number. The program should end when the…
A: Guessing a number will be done by using loop. IN the python programming language there are three…
Q: Write a program that accepts a number and determines whether the number is even. If it is even,…
A: Here I written C code for given even problem below. I hope you like it.
Q: Write a program that asks the user for a number then prints out that number with the message shown:…
A: Code to print the message as per output #include <iostream> using namespace std; int main() {…
Q: Write a program that asks the user to enter a password consisting of 7 characters. If the user…
A: Program: //import the header file import java.util.*; //definition of class class Main {…
Q: Create a program that asks the user to tell a story using input from the keyboard and print it Ask…
A: your question is about python programming. let's write the code for it
Q: Write a program, which takes an input from the user, if the number is between 90 100, Print A Grade,…
A: Since no programming language is mentioned, I am using python Algorithm: 1. Start 2. Take input…
Q: Write a program that will ask the user to enter an integer number and display the message r even…
A: An even number is a 2-fold integer. An integer not precisely divided by 2 is a mysterious number.…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: Program code: //include the required header files #include<iostream> using namespace std;…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: Since the programming language is not mentioned in the question, we will answer this question in the…
Q: Write a complete program that prompts the user to enter two integer numbers x and y, and outputs the…
A: Program: #include<bits/stdc++.h> using namespace std; int main(){ int x,y; cout<<"Enter…
Q: write a program that accepts a number and determines whether the number is positive, negative or a…
A: here in this question we have asked to write a program which takes an input from user and…
Q: Write a program that prompts the user to enter the number of seconds, displays a message at every…
A: Program Code in Python seconds = int(input("Enter the number of seconds: "))while seconds > 2:…
Q: he user to enter a person's age. the program should display a message indiciating whether the person…
A: Code: inputAge = float(input("Enter person's age: ")) if (inputAge > -1 and inputAge <= 1 )…
Q: Write a program that accepts a number and determines whether the number is positive, negative or a…
A: Given: To write a C code.
Q: Write a program that prompts the user to enter two integer numbers x and y. The program must check…
A: The complete JAVA code is given below with code and output screenshots
Q: Write a program that asks the user for a number, and divides it by 2 then prints out the result:…
A: As per the requirement here I am providing the code. Here is the algorithm. Step 1: Start Step 2:…
Q: Write a program that prompts the user to input a decimal number and outputs the number rounded to…
A: Program code: //include the required header files #include<iostream> using namespace std;…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: # Program make a simple calculator # This function adds two numbers def add(x, y): return x + y #…
Q: Make a program which displays a different message depending on the age given. Here are the possible…
A: the java program is an given below :
Write a
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images
- The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows: If the number of rooms booked at least 10, the discount is 10%; at least 20, the discount is 20%; and at least 30, the discount is 30%. Also if rooms are booked for at least three days, then there is an additional 5% discount. Write a program that prompts the user to enter the cost of renting one room, the number of rooms booked, the number of days the rooms are booked, and the sales tax (as a percent). The program outputs the cost of renting one room, the discount on each room as a percent, the number of rooms booked, the number of days the rooms are booked, the total cost of the rooms, the sales tax, and the total billing amount. Your program must use appropriate named constants to store special values such as various discounts.A 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.Write a program that prompts the user to input three numbers. The program should then output the numbers in descending order (big to small).
- Write a program that prompts the user to input three numbers. The program should then output the numbers in ascending order.Using Python Write a program that displays all numbers from 1 to y that are divisible by x, where x and y are entered by the user:Example:if x = 3 and y = 30, the output is 3, 6, 9, 12, 15, 18, 21, 24, 27, 30Write a program that asks for the number of calories and fat grams in a food. The program should display the percentage of calories that come from fat. If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating that the food is low in fat. One gram of fat has 9 calories, so Calories from fat = fat grams * 9. The percentage of calories from fat can be calculated as Calories from fat ÷ total calories . Input Validation: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If that happens, display an error message indicating that either the calories or fat grams were incorrectly entered.
- A store charges $12 per item if you buy less than 10 items. If you buy between 10 and 99 items, the cost is $10 per item. If you buy 100 or more items, the cost is $7 per item. Write a program that asks the user how many items they are buying and prints the total cost.Madison County collects property taxes on the assessed value of property, which is 60 percent of its actual value. For example, if a house is valued at $158,000 its assessed value is $94,800. This is the amount the homeowner pays tax on. At last year’s tax rate of $2.64 for each $100 of assessed value, the annual property tax for this house would be $2502.72. Write a program that asks the user to input the actual value of a piece of property and the current tax rate for each $100 of assessed value. The program should then calculate and report how much annual property tax the homeowner will be charged for this property.write a program that prompts the user to enter the number of students and each student name and score and finally display the name of student with highest score and the student with second highest score.
- Write a program that will ask the user to enter salary amount. And then compute for the TAX amount. If salary is 10,000 and below, the tax amount is 21% of the salary amount. if the salary is between 10,001 and 30,000, the tax amount is 28% of the salary amount. If the salary is more than 30,000, the tax is 31% of the salary amount. Then compute the net salary which is the Salary amount less tax amount. Display tax amount and net Salary.Write a program that asks the user for their name and their height in inches ("Enter your name: ", "Enter your height in inches: "). The program should display the person’s name and whether they are short, average, or tall. Short is less than 60 inches and tall is greater than 72 inches in between is average height. Display the output in the following format as an example: (Joe, “ your height is short” )Write a program that prompts the user to input their names and age and then displays your name and age.