Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. End with a newline.
Q: Java program:; User's name. Write a program that prompts for and reads the user's first and last…
A: Initialize Scanner and Variables: Create a `Scanner` object for user input. Declare variables for…
Q: 3. Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer.…
A: The Answer is in given below steps
Q: Write a program that reads from the user a character ('q' or 'c'). • i the character is 'c', the…
A: Since the programming language is not mentioned, we'll do it in python. The programming methodology…
Q: write a program that displays, in ascending order,the first names of those students who have…
A: Step 1:- In the question does not show in which language write the program therefor above program…
Q: A parking garage charges a $20.00 minimum fee to park for up to three hours. The garage charges an…
A: Sample Response: //C++ programming language, tested on CodeBlock IDE#include…
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: write a program that reads in an integer value between 1 and 5(inclusive) and a text word from the…
A: Code: Since you have not mentione the language to code i am providing the code in c++ #include…
Q: Write a program that takes a positive integer as the height of the triangle and prints an…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that prompts the user to enter an integer anddisplays whether the integer is an odd…
A: Program code: //include the required packages #include <stdio.h> //define main function int…
Q: 1. Write a program to have the user guess a number stored in the program. If he guesses right, tell…
A: As per our guidelines we are supposed to answer?️ only one question. Kindly repost other questions…
Q: program that reads an integer and prints how many digits it has
A: Required code (using java programming language) :- //import util packageimport…
Q: A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an…
A: Steps/Algo: Ask the user to enter the number of hours parked. Calculate charges using the…
Q: Write a program which prompts the user for a number and prints the numbers from 1 up to that number,…
A: ALGORITHM:- 1. Take the value of n as input from user. 2. Generate the numbers from 1 to the input…
Q: Write a program that allows a user to enter any number of student quiz scores, as integers, until…
A: Since you haven't mentioned the programming language, we are answering this question in C++. Program…
Q: positive
A: Introduction Here we will provide a sample of a program where we can rectify whether the result is…
Q: Please write a program which prints out the following story. The user gives a name and a year, which…
A: The algorithm of the code:- 1. Start2. Ask the user to type in a name3. Store the name in a string…
Q: Write a program that helps a company manage salaries of its employees. Your program should ask for…
A: EXPLANATION - A program is created . On program three variables are declared one for hours worked…
Q: write a program in python Write a program that will allow a student to enter their name and then…
A: In order to solve this first we need to initiate count to 0 and the count the correct answers by…
Q: Write a program that lets the user guess whether a randomly generated integer would be even or odd.…
A: #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /*…
Q: Write a program that generates a plate number based on the user's answer to the following questions:…
A: PROGRAM EXPLANATION Include the header file. Define the main function. Create variables for input…
Q: Write a program that reads from the user a character (ʻq’ or 'c'). If the character is 'c', the…
A: int main() { printf("enter the character :"); scanf("%c" &a); if(a=='c') { int r; scanf("%d",…
Q: Write a program that asks the user to enter 10 numbers, that range from 10-100. Make sure that you…
A: Solution: Given, Write a program that asks the user to enter 10 numbers, that range from 10-100.…
Q: In Java: Forms often allow a user to enter an integer. Write a program that takes in a string…
A: Actually, the code has given below:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Please write a program which prints out the following story. The user gives a name and a year, which should be inserted into the printout. Please type in a name: Mary Please type in a year: 1572 Mary is a valiant knight, born in the year 1572. One morning Mary woke up to an awful racket: a dragon was approaching the village. Only Mary could save the village's residents. The story should change according to the input given by the user. Sample output 1Coral Help Write a program that takes a date as input and outputs the date's season. The input is an integer to represent the month and an integer to represent the day. Ex: If the input is: 4 11 the output is: spring In addition, check if both integers are valid (an actual month and day). Ex: If the input is: 14 65 the output is: invalid The dates for each season are:spring: March 20 - June 20summer: June 21 - September 21autumn: September 22 - December 20winter: December 21 - March 19f. 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 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 characterWrite a program that reads student scores, gets the best score, andthen assigns grades based on the following scheme:Grade is A if score is ≥ best -5Grade is B if score is ≥best -10;Grade is C if score is ≥best -15;Grade is D if score is ≥best -20;Grade is F otherwise.The program prompts the user to enter the total number of students, and thenprompts the user to enter all of the scores, and concludes by displaying the grades.Here is a sample run: Enter the number of students: 4 ↵EnterEnter 4 scores: 40 55 70 58 ↵EnterStudent 0 score is 40 and grade is FStudent 1 score is 55 and grade is CStudent 2 score is 70 and grade is AStudent 3 score is 58 and grade is CStatistics are often calculated with varying amounts of input data. Write a program that prompts for and takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Example program run (the user types only the numbers, in this case 15 20 0 5 -1): Enter numbers separated by spaces, with a negative number to quit: 15 20 0 5 -1 Average = 10 Max = 20 #include <iostream>using namespace std;/* program that prompts for and takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Example program run (the user types only the numbers, in this case 15 20 0 5 -1): Enter numbers separated by spaces, with a negative number to quit:15 20 0 5 -1 Average = 10 Max = 20*/ int main() { /* Type your code here. */ return 0;}
- Write 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…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? I1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the user to enter a number from 1-6 and the corresponding hangman should be printed. The value the user inputs corresponds to the number of incorrect guesses in a real hangman game and so the completeness of the hangman will correspond to the number of ‘incorrect guesses’ inputted by the user (e.g., if the user enters 1, then only the head of the hangman will be printed; full example below). Example:Enter a number from 1-6: 1O Enter a number from 1-6: 2O|Enter a number from 1-6: 3O\||Enter a number from 1-6: 4O\|/|Enter a number from 1-6: 5O\|/|/Enter a number from 1-6: 6O\|/|/ \ 2. Modify your program from problem 1 so that the user input is checked to be a validsingle digit (1-6) before printing the corresponding hangman. If the input is not valid, theninstead of a hangman the following message should be printed “Invalid input: you must enter asingle number from 1-6.” Example:Enter a…
- use c languagre program.Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program should allow the user to enter the information of many employees until enters -1. Sample Run: Enter the number of hours worked (-1 to end): 32 Enter hourly rate of the worker: 100 Balary is 03200 Enter the number of hours Worked (-1 to end) : 40 Enter hourly rate of the worker: 5 Balary is 3200 Enter the number of hours worked (-1 to end): 42 Enter hourly rate of the worker: 10 Salary is 0420 Enter the number of hours worked (-1 to end) : -1the electrical resistance r (in ohms) of a metal wire is given by the formula r = (ml)/ a where m is the resistivity of the metal; l is the lenght of the wire in feer, and a is the cross-sectional area of the wire ( in the circular mils) write a program that allow user to input for l and a for a copper whose resistivity m of copper is 10.4. Calculte the resistance of a wire