Write a program that converts pounds into kilograms. The program prompts the user to enter a value in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.
Q: Write a program that assigns the following values:
A: Program understanding In java, assigning the values to a variable of a particular type is performed…
Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…
A: 1. Input All values 2. Calculate gross=hour_pay_rate*10 deduction=gross*0.20 state=gross*0.09…
Q: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The…
A: Answer : #include<iostream>#include<ctime>#include<cstdlib>using namespace std;int…
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a value…
A: PROGRAMimport java.util.Scanner;public class Shubham { public static Void main(string[] args) {…
Q: Write a program that prompts the user to enter three cities and displays them in ascending order.
A: #include<iostream>#include<string.h>using namespace std;int main(){char nameAll[5][20],…
Q: Write a program that asks the user for the number of miles driven and the gallons of used. It should…
A: The formula to calculate the miles per gallon of the vehicle is as follows Miles per gallon,…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT GIVEN, I HAVE USED PYTHON FOR THE SOLUTION Define…
Q: Use Python to write a program that asks the user to enter a pocket number and displays whether the…
A: We can use relational operators or range function to check the number whether in range or not So,…
Q: Write a program that prompts the user to enter an uppercase letter and converts it to a lowercase…
A: Program plan: Take input in uppercase add 32 to in ( ascii code) print character
Q: Write a program that plays the popular scissor-rock- paper game. (A scissor can cut a paper, a rock…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION Define…
Q: Write a program that prints a grocery receipt of items purchased.
A: EXPLANATION- Create main function . Declare seven variables with suitable names Initialize all the…
Q: Write a program that calculates the estimated hours and minutes for a trip given the number of miles…
A: Given: Write a program that calculates the estimated hours and minutes for a trip given the number…
Q: Write a program that will display "IT'S COLD!" if the temperature is less than 20, "IT'S HOI" if the…
A: #include <iostream> using namespace std; int main(){ float t; cout<<"Computing the…
Q: Write a program that reads in an investment amount, the annual interest rate, and the number of…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that asks the user for their name and their height in inches ("Enter your name: ",…
A:
Q: Write a program that prompts the user to enter the year and the first three letters of a month name…
A: CODE TO COPY:- month_lst = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',…
Q: Write a program that will allow a grocery store to keep track of the total number of bottles…
A: The solution of the given problem is given below:
Q: a) Write a program that begins by reading a radius, r from the user. The program will continue by…
A: TO FIND AREA AND VOLUME OF THE CIRCLE
Q: Write a program that gets two car information from the user, compares them, and print out the…
A: First, we need to define Car class with the attributes and methods and then define the main function…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: Introduction of the Program: This C++ program takes score from the user and if scores are between…
Q: Write a program that prompts the user to enter an integer between1 and 12 and then displays the name…
A: Program approach: Input an integer between 1 and 12. Displays the name of the month that…
Q: To make telephone numbers easier to remember, some companies use letters to show their telephone…
A: Program: #include <iostream> using namespace std; int main() { char ch; cout <<…
Q: Write a program that converts "kilometers per hour" to "miles per hour". miles = (kilometers…
A: Hi. As there is no language mentioned, I will attempt this question using Python. Let's move on…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: Write a program that lets the user guess whether a flipped coin displays the head or the tail. The…
A: GIVEN: Write a program that lets the user guess whether a flipped coin displays the head or the…
Q: Write a program that displays a simulated paycheck. The program should ask the user to enter the…
A: Define header file <iostream>, <cstring> , <string> and <iomanip>. Define…
Q: Write a program that computes and interprets the Body Mass Index (BMI). The program prompts the user…
A: Start Input weight in pounds Input height in inches Convert weight to kilograms Convert height to…
Q: Write a program that will allow a grocery store to keep track of the total number of bottles…
A: Pseudocode:- Pseudocode is a made-up, informal programming language that helps programmers create…
Q: 8. Write and run a program that reads the user's age and then prints "You are a child." if the age <…
A: As Bartleby guidelines i can solve one question at a time so please post another question again.…
Q: Write a program that calculates how much money you’ll end up with if you invest an amount of money…
A: In Cpp Program #include <iostream>#include <cmath>using namespace std; int main(){int…
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Since no programming language was mentioned in the question, I have used C language to solve.
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a number…
A: C++ Program: #include<iostream>using namespace std; // Function convertPtoK() to convert…
Q: Туре your Write a program that prints out the names of the three main Flintstones characters: Fred,…
A: Start Print name of three Flintstones character Print Fred Print Wilma Print pebble Stop
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: Hello student Here is your answer
Q: Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car…
A: Program Plan: importing the libraries of utility class for scanner and other mathematical…
Q: Write a program that reads the subtotal and the gratuity rate and computes the gratuity and total.…
A: GIVEN: Write a program that reads the subtotal and the gratuity rate and computes the gratuity and…
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION. Define…
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Program in java for calculation of monthly and total payments for each interest rate. import…
Q: Write a program that calculate electricity bill. The program prompts the user to enter the amount of…
A: C program #include <stdio.h>int main(){ int un; float amt; /* Input units consumed…
Q: Write a program that will convert miles to kilometers and kilometers to miles. The user will…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: Note: Programming Language not specified using C++ to implement code: //include the necessary…
Q: In an eye-glass shop, a customer can buy either a pair of single prescription glasses (or a pair of…
A: Code: import java.util.*;public class MyClass { public static void main(String args[]) {…
Q: Write a program that prompts the user to enter the name, the number of children, and the basic…
A: Since programming language not mentioned using Python CODE: # cook your dish herename=input("Enter…
Q: Write a program that prompts the user to enter the month and year and displays the number of days in…
A: February has 28 days in non-leap years and has 29 days in leap years
Q: • Write a program that computes the average of 5 students grades which are entered by the user.…
A: Please find the answer below :
Q: Write a program that prompts the user to enter the number of items and each item’s name and price,…
A: Step 1:- Program Approach:- 1.Include the header files 2.Declare variables, an array of data type…
Q: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
A: Given: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
Q: Write a program that asks the user to enter "air", "water", or "steel", and the distance that a…
A: Introduction of Program: In this Java program, the speed of sound in Air=1100 feet per second, speed…
Write a program that converts pounds into kilograms. The program prompts the user to enter a value in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.
Step by step
Solved in 2 steps
- Write a program that converts pounds into kilograms. The program prompts the user to enter a value in pounds, converts it to kilograms, and displays the result.The following table shows the approximate speed of sound in air, water, and steel: Write a program that asks the user to enter “air”, “water”, or “steel” and the distance that a sound wave will travel in the medium. The program should then display the amount of time it will take. You can calculate the amount of time it takes sound to travel in air with the following formula: Time = Distance / 1,100 You can calculate the amount of time it takes sound to travel in water with the following formula: Time = Distance / 4,900 You can calculate the amount of time it takes sound to travel in steel with the following formula: Time = Distance / 16,400The following table shows the approximate speed of sound in air, water, and steel:Write a program that asks the user to enter “air”, “water”, or “steel”and thedistance that a sound wave will travel in the medium. The program should thendisplay the amount of time it will take. You can calculate the amount of time ittakes sound to travel in air with the following formula: Time = Distance / 1,100You can calculate the amount of time it takes sound to travel in water with the following formula:Time = Distance / 4,900You can calculate the amount of time it takes sound to travel in steel with the follow- ingformula:Time = Distance / 16,400
- Body mass index (BMI) is a measure of health based on weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters.Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." If the user guesses the number, the application should congratulate the user and generate a new random number so the game can start over. Additional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” If the user guesses the number, the application should congratulate the user and then generate a new random number so the game can start over.Optional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.
- Write a program that asks the user for two positive integers between 2 and 10 to use for the length and width of a rectangle. If the numbers are different, the larger of the two numbers should be used for the length and the smaller for the width. The program should then display a rectangle of this size on the screen using the character ‘X’. For example, if the user enters either 2 5 or 5 2, the program should display the following:Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula:BMI = weight × 703 / height2where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person’s weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight please write code on c++Write a program that lets the user guess whether a flipped coin displays the head or the tail. The program randomly generates an integer 0 or1, which represents head or tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.
- Questions 1. Write a program which asks the user to enter a six-digit number and print a new number by subtracting 1 to each of its digits. For example, if the number entered is 393201, the output should be displayed as 282190. Information on the console should be displayed similar to the Sample Run shown below. Sample Run: Enter a 6 digit number: 393201 Modified number is: 28219dWrite a program that generates a random number in the range of 1 through 1000, and asks the user to guess what the number is. If the user guess is higher than the random number, the program should display Too high, try again. If the users guess is lower than the random number, the program should display Too low, try again. If the user guesses the number, the application should congratulate the user and generate a new random number so the game can start over. If the user doesn't want to continue the game the user should type an appropriate stop symbol to terminate the program (such stop conditions were discussed in the class). For each game iteration, count the number of guesses made by the user and display them. The program should contain the following functions: check_guess(): this function checks if the user's guess is lower, higher or equal to the random number. random_gen(): function that generates one random number for one game iteration main(): the function where the program…Converting pounds into kilograms Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms. Here is a sample run: Enter a number in pounds: 200 200.0 pounds is 90.8 kilograms