Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.
Q: Write a program that takes the user age and prints the following: Print too old, if age is greater…
A: Use if else if statements to check all the conditions one by one
Q: Write a program that prompts for and reads the radius and the height of a cylinder (in centimeters).…
A: Answer : Here is the C++ code: //included header file #include<iostream> //included namespace…
Q: Write a program that randomly generates a number between 1-200, then asks the user to guess the…
A: Program: from random import randintrandom_number = randint(1, 200)count = 0userinput =…
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: Please find the answer below :
Q: Write a Java program that asks a user to enter a number and prints out if it is odd or even.
A: Use Scanner class object nextInt() to take input from user. First create object of Scanner class…
Q: Write a program in kotlin to add two given numbers and print the results.
A: Required:- Write a program in kotlin to add two given numbers and print the results. approach:-…
Q: Write a program that converts temperatures from Fahrenheit to Celsius.
A: #include<stdio.h> int main() { float Fahrenheit,…
Q: Write a Java program that asks a user to enter the three angles of a triangle. If the sum of three…
A: import java.util.Scanner; class Main { publicstaticvoid main(String[] args) { Scanner sc = new…
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Algorithm: Input word from user Append a space to the input word Iterate a for loop for variable i…
Q: Write a program using if, and elif and else, that asks the user what their favorite food is. Then…
A: We need to read a string and compare the string with list of favorite food.
Q: Write a program that asks the user for a word, then prints out the word between the word bread, to…
A: Please find the answer below :
Q: Write a program that takes all 3 sides of a triangle and prints whether the triangle is equilateral,…
A: Algorithm: Start Input three sides of the triangle from user If side1==side2 and side2==side3 then…
Q: Write a program that finds five prime numbers largerthan Long.MAX_VALUE.
A: Program: //import math package for mathematical operations import java.math.*; public class Main {…
Q: Write a program that generates 50 random numbers such that the first number is between 1 and 2, the…
A: ## As no language is mentioned, the code is written in Python. import random # for loop runs…
Q: Write a program that will compute the area of a triangle
A: C program using height and base #include <stdio.h>#include <math.h>double…
Q: Write a program that reads ten integers, and then display the number of even numbers and odd…
A: The given program is in the C++ programming language.
Q: Write a program that asks the user for a number of seconds and prints out how many minutes and…
A: Program: To asks the user for a number of seconds and print as minutes and seconds format.…
Q: Write a program that simulates flipping a coin twomillions times and displays the number of heads…
A: Program code: //import the required packagesimport java.util.*;//Declare class HeadTailCoinpublic…
Q: Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: write a program that reads the height in centimeters and then converts the height to feet and…
A: NOTE: As the programming language is not mentioned in the question. So, we have solved this question…
Q: Write a program that reads 11 integers, compares eachinteger with the 11th integer, and displays…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Write a program which reads two integer numbers from users and then display all prime numbers within…
A: According to the Question below the Complete Program: Program Output:
Q: Write a program that will draw a reversed triangle. Your program will ask for the height of the…
A: Task :- Write a C++ program to print the pattern. C++ program :- #include<iostream>using…
Q: Write a program that asks the user to guess a random number between 1 and 10. If they guess right,…
A: Program: # initialize the score to 0 score = 0; # the number to guess is 5 number = 5; # run the…
Q: Write a program that displays allthe numbers from 100 to 200, ten per line, that are divisible by 3…
A: Let us consider a java program that displays all the numbers from 100 to 200 ten per line, that are…
Q: Write a program that displays, ten numbers per line, all the numbers from 100 to 1,000 that are…
A: Program code: #declaring required variables num = 1 #for loop for i in range(100, 1001): #if…
Q: Write a program that examines three variables - p, q, and r - and prints the smallest even number…
A: As per our guidelines we are suppose to answer only first question. Kindly repost other questions…
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 reads the value of x and y, then if x is bigger than or equal y calculate and…
A: Math functions used in the program Math.pow() Math.cos The program first inputs the value of x and…
Q: Write a program that keep asking for a number until you enter a negative number. At the end, print…
A: I give the code in Python because you have not specified any language along with output and code…
Q: Write a program that prints out the letters of a word, one on each line, in the format "The letter…
A: Logic :- use split() method to separate string and store it in array. display each word of array.
Q: Write a program that prints a grocery receipt of items purchased.
A: The Given program is to print a grocery receipt
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Write a program that gets 2 string variables and 2 integer variables from the user, concatenates…
A: Here I have taken input from the user. Next, I have multiplied the 2 numbers and stored the product…
Q: Write a program that reads in a series of integer numbers, and determines how many positive odd…
A: Since the programming language is not mentioned, so we'll do it in python. The programming…
Q: Write a program that promotes the user to enter the number of students and each student's name and…
A: The java program and the approach that prompts the user to enter the names and the scores of the…
Q: Write a program that asks the user how many credit units they have taken. If they have taken 23 or…
A: Program Approach: Include the necessary header files for the standard I/O. Declare a user 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 reads 6 integers and displays the largest and the smallest amongst those…
A: C++ code: To displays the largest and the smallest amongst 6 integers #include <iostream>using…
Q: Write a program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and…
A: A program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and 4.…
Q: Write a program that simulates picking a card from a deck of 52 cards. Your program should display…
A: JAVA Program: public class Main { public static void main(String[] args) { int card = (int)…
Q: Write a program that simulates flipping a coin one million times and displays the number of heads…
A: Code: public class CoinFlip { public static void main(String[] args) { int heads = 0; int…
Q: Write a program that takes an age (for example 15) as input and prints something as "You look older…
A: Please find the answer below :
Q: Write a program to find two points that are nearest to each other. For example, points (1, 1) and…
A: I have added the comments. I have also added the screenshot. The class name is Test. So the commands…
Q: Write a program that asks the user for an animal sound, then prints out that sound twice on the same…
A: the answer is given below:-
Q: Write a program that prints out the name of my favourite dinosaur, Tyrannosaurus Rex: Tyrannosaurus…
A: As given, I need to write a Python program that prints the name of a dinosaur, Tyrannosaurus Rex. I…
Q: Write a program that displays all the numbers from 300 to 400, 5 per line, that are divisible by 3…
A: Since the programming language is not mentioned, so we'll do it in java. The programming methodology…
Q: Write a program that will display the even numbers from 1 to 100.
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Write a
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes equals 100 hours and equals 4.167 days.Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an inte- ger and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.Write a program that reads from the user a character ('q' or 'c'). If the character is 'c', the program reads from the user the radius rof a circle and prints its area. • If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. • Otherwise, it prints "Wrong character" PS: Use the following formulas: area of circle=3.14*r Sample Run1: Enter a character (q or c): q Enter the Length and Width: 80 150 |It is a rectangle Sample Run2: Enter a character (q or c): q Enter the Length and Width: 80 80 It is a square Sample Run3: Enter a character (q or c): c Enter the radius: 2 The area of the circle is 12.56 Sample Run4: Enter a character (q or c): d Wrong character
- f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…Write a program that reads from the user a character (*q' or 'c'). If the character is 'c', the program reads from the user the radius r of a circle and prints its area. If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. Otherwise, it prints "Wrong character" PS: Use the following formulas : area of circle=3.14*r? IWrite a program that reads an integer and displays its first five multiples. For example, if the input integer is 10, the output should be as follows: 10, 20, 30, 40, 50.
- Write a program that reads the employee's name and base salary and then calculates the tax and net amount Salary where: Net salary = Basic salary If the basic salary is less than 500 (no tax) Net salary = basic salary - tax value So that the tax amount is 5% of the basic salary Then it prints the employee's name and net salary %3D 2:40 PM /Write a program that reads 6 integers and displays the largest and the smallest amongst those integers.Write a program that displays every integer between 1 and 100 that is divisible by 5 or 7, but not both. Write it using While and for.
- Python Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeRWrite a 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 (ROYGVIB)? 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 number. a. Display "Invalid Input" and ask…You have been asked to write a program to play rock-paper-scissors. Your program will ask the user to input a number 0, 1, or 2 to denote rock, paper, and scissors respectively. Your program will then randomly generate a number 0, 1, or 2 to denote the computer’s hand. The rules for the game are: •A scissor can cut paper. •A rock can knock a scissor. •A piece of paper can wrap a rock. Let the game run continuously until either the user or the computer wins 3 times, displaying the outcome of each hand. At the end of the game, display a message indicating whether the user or the computer wins Helpful Hint: import random player2= random.randint(0, 2)