Write a program that asks the user to enter a month (1 for January, 2 for February, etc.) and then prints the number of days in the month. For February, print “28 days”. Enter a month: 5 30 days
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 enter five test scores and then prints the average test…
A: Note: since the programming language is not the question is implemented using C++.
Q: Write a program that reads a code and temperature. If the co Fahrenheit. If the code is 2, convert…
A: Fortran 90 program: Program Hello IMPLICIT NONE !declaration REAL::temperature,…
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 asks the user to enter a month (1 for January, 2 for February, etc.) and then…
A: Program plan: This software asks the user to enter any number from 1 to12, with 1= January, 2=…
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 prompts the user to enter theminutes (e.g., 1 billion), and displays the number…
A: Program code: //IMPORT Scanner class import java.util.Scanner; //define a class NoOfYears public…
Q: 3) Write a program that reads an integer and prints how many digits it has by checking whether the…
A: Python program to solve the given problem is below.
Q: Write a program that converts temperature from Celsius to Fahrenheit and Fahrenheit to Celsius. The…
A: Program is below as per requirements with commented explanation and output.
Q: Write a program that asks the user to enter a three-digit number, then prints the sum of its digits
A: Code snippet:
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 calculates the number of hours, minutes, and seconds in N seconds. Example: In…
A: The above question is solved in step 2 :-
Q: Write a program to get a random number between 1 and 100, use the button to check whether the given…
A: write a program to get random number between 1 and 100......
Q: Write a program that asks the user for a number, and multiplies it by 3 then prints out the result:…
A: Start Prompt the user for input Parse it as integer Multiply the number by 3 Print the result Stop
Q: Write a program that prompts the user to enter an integer and checks whether the number is divisible…
A: The c++ program is given below, as language is not mentioned.
Q: Write a program that prompts the user to enter the month and first day of the month, and displays…
A: /*program that prompts the user to enter the month and first day of the month, and displays all the…
Q: Write a program to prompt the user for their age. Based on their age print out which generation they…
A: If age>21 and age<36 You are generation millennials. Youth ends at 40, old age begins at 59.…
Q: Write a program which takes the user's age in years and convert it into months. 1 Year= 12 Months %D
A: Algorithm: Step1: Declare variables, Nofmonths & years to store values. Step2: Receive the user…
Q: Write a program that asks the user to input 10 numbers and counts how many odd numbers that user…
A: Algorithm:- (I) declare array of size 10. (II) using loop take input . (III) use modulo 2 to…
Q: Write a program that asks the user for a number and prints out 100 divided by the number: Enter a…
A:
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 asks the user for a number and prints out the number cubed (raised to the power…
A: Lets see the solution.
Q: Write a program that asks the user for a number and prints out 2 to the power of that number: Enter…
A: Given Python program to find 2^n.
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 prompts the user to enter a three-digit integer and determines whether it is a…
A:
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 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 prompts the user to enter the currency exchange rate between U.S. dollars and…
A: GIVEN: Write a program that prompts the user to enter the currency exchange rate between U.S.…
Q: Write a program that will count the number of votes for each candidate, show the total number of…
A: Use an array to store the votes for each candidate and keep on voting till user wish to quit
Q: Write a program that prompts the user to enter the numberof students and each student’s name and…
A: Program: import java.util.*; public class Main { static void LowestScores(String name[], float…
Q: Write a program that takes in a positive integer as input representing the number of employees, then…
A: We plan to use a Language Understanding container for an application that we previously exported. We…
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: write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: We need to write a program that takes input of an angle from user in degrees and print the sine of…
Q: Write a program that prompts the user to enter the number of items and each item’s name and price,…
A: Note: As programming language is not mentioned. So used Python to complete the task. Program: #…
Q: Write a program that prompts the user to enter the year and first day of the year, then displays the…
A: Given, we get- year from the user, first day of the year from user. based on the above data, we…
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 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 shows the numbers up to the entered number that are divisible by 6 but not…
A: Here I have first of all asked the user to enter a number and stored it into a variable num. Now I…
Q: Write a program that asks the user to enter two numbers, obtains the two numbers from the user and…
A: Given: Write a program that asks the user to enter two numbers, obtains the two numbers from the…
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 prompts the user to enter the number of students and each student 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 calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
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 program that asks the user to enter a month (1 for January, 2 for February, etc.) and then
prints the number of days in the month. For February, print “28 days”.
Enter a month: 5
30 days
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- Airline 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önderWrite a program that asks the user to enter a month (1 for January, 2 for February, etc.) and thenprints the number of days in the month. For February, print “28 days”.Enter a month: 530 days Note : Solve this by using javaPython 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 numbeR
- Write a program that asks the user for the number of adult and the number of child movie tickets they are purchasing. (Store these values in variables using meaningful names.) Print the percentage of adult tickets followed by a space and the percentage of child tickets. Example: Suppose they are purchasing are 8 adult tickets and 12 child tickets. There are 20 total tickets being purchased. The percentage of adult tickets can be calculated as 100*(8 / 20). For example: Input Result 8 12 40.0 60.0The monthly payment for a givenloan pays the principal and the interest. The monthly interest is computed by multiplyingthe monthly interest rate and the balance (the remaining principal). The principalpaid for the month is therefore the monthly payment minus the monthly interest.Write a program that lets the user enter the loan amount, number of years, and interestrate then displays the amortization schedule for the loan. Here is a sample run: Loan Amount: 10000 ↵EnterNumber of Years: 1 ↵EnterAnnual Interest Rate: 7 ↵EnterMonthly Payment: 865.26Total Payment: 10383.21Payment# Interest Principal Balance1 58.33 806.93 9193.072 53.62 811.64 8381.43...11 10.00 855.26 860.2712 5.01 860.25 0.01A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and prints the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format Sample output Enter the hours parked for 3 cars: 1.5 4.0 24.0 Car Hours Charge 1 1.5 2.00 2 4.0 2.50 3 24.0 10.00 TOTAL 29.5 14.50
- 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) : -1Write 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.Write a program which takes the users age in years and convert it into months. 1 Year= 12 Months
- Question 1 Write a program that asks the user to enter the number of passengers in an airplane and the weight of baggage for these passengers. Your program should then print the average weight of all baggage; it should also print the weights in reverse order. Sample run: Enter the number of passengers in the airplane: 8 Enter the weights of 8 baggage: 16 45 60 13 24 29 50 30 The average weight of all baggage is 33.375 The entered weights in reverse order are 30 50 29 24 13 60 45 16f. 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 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 still asks the user to enter the information of many employees until enters a zero value. Sample Run: Enter the number of hours worked (negative nbr to end): 32 Enter hourly rate of the worker: 100 Your salary is $3200 Enter the number of hours worked (negative nbr to end): 40 Enter hourly rate of the worker: 5 Your salary is $200 Enter the number of hours worked (negative nbr to end): 42 Enter hourly rate of the worker: 10 Your salary is 5420 Enter the number of hours worked (negative nbr to end): 0