Q3.Write a program that input the month and the day. If the month entered isn't between I and 12, display a message informing the user that an invalid month has been entered. If the day entered isn't between I and 31, display a message informing the user that an invalid day has been entered.
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: "Since you have not mention any programming language, so we will write this program in C++…
Q: 1) Write a program that reads 3 integers and produce exactly one message of the following 3…
A: As programming language is not mentioned so we are providing answer in C++ language.
Q: B. Write a program that prompts for students' final grades in a given class (the grades are integer…
A: PROGRAM EXPLANATION: Import java.util package. Create the main class and define the main method Run…
Q: 10) Write a program that translates a letter grade into a number grade. Letter grades are A, B, C,…
A: note:- always mention programming language name in question, this is done in python. logic:-…
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: Write a program that takes a range from the user and display all the even numbers between the range…
A: Note - Since there is nothing mentioned about the programming language to be used, so this program…
Q: 4)Write program that input the user age and print the sentence: a) You are child if the age is less…
A: There is not mentioned any programming language so I used JAVA Step 1 : Declare a variable age and…
Q: B. Write a program that prompts for students' final grades in a given class (the grades are integer…
A: Code: import java.util.*;public class Main{ public static void main(String[] args) { //scanner…
Q: Write a program that asks user to enter a number until user enters -1. Then the program should…
A: Since you have not mentioned programming language I'm doing this in c++.
Q: 5. Write a program that reports whether someone is eligible to run for president in the U.S. You…
A: According to the information given:- We have to follow instruction to create eligibility criteria
Q: Write a program that inputs year and month number, it then display the number of days in that month…
A: The given problem is to be solved in programming language where the user will input the year and…
Q: Write aC++program that allows a user to enter their rating of the three movies in the DarkKnight…
A: [Note: Explanation of the program code is provided within the comments.] Program code:…
Q: Question 1: Write a C program that do the following: A Ask the user to enter his grade as (A, B, C,…
A: Below is the required code in C language. Approach to Program: Include necessary header files to…
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A: 9 Solution
Q: 7. Write a program that asks the user's name, and then greets the user by name. Before outputting…
A: The problem is based on writing the code to input users' name and to greet the user after converting…
Q: Q3: Write a VB program to enter a mark of a student and then find his grade as follows: If mark >=75…
A: VB program is asked with the following conditions: If mark>=75 print Grade = A If…
Q: In CPP Write a program in which user enters number of days and program prints the number of years,…
A: Given that 1 Year has 356 days so to get the number of years divide the number of days by 356 and…
Q: Write a program, which: inputs 50 numbers outputs how many of the numbers were > 100 langiage C#
A: #include <stdio.h> int main(){ int x, i, sum=0; x=0; int A[50]; printf("Input 50…
Q: Write a program that input miles from the user and convert miles into kilometres. One mile is equal…
A: Data types in C++: Some of the basic datatypes of C++ are: int float double char wchar_t bool void
Q: Excercise1: write a program to enter a user name and display the message (hello) three times. The…
A: Note: Since programming language is not specified we are providing solution in python programming.…
Q: Write a program that prompts the user to enter the name of a football team and its foundation year.…
A: The programming languages include Java, c, c++. The program reads the input from the user that is…
Q: 2) Write a programC++ that asks the user to enter two integers, and then prints the larger number…
A:
Q: Write a program that prompts the user to input three numbers. The program should then output the…
A: #include<iostream> #include<algorithm> using namespace std; int main(){ cout…
Q: Write a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Java program for the above fuel consumption problem is given below in step 2.
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: Concept: If X is +ve and Y is +ve, then Quadrant is 1 If X is +ve and Y is -ve, then Quadrant is 4…
Q: 2. Write a complete program that prompts the user for a test score and prints out the letter score…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc…
Q: 3- Write a program which accept a number of 2 digits and check if ones digit is greater than the…
A: C++ Program for above : #include <bits/stdc++.h> 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: write a program that uses input to prompt a user for their name and then welcomes them. Enter your…
A: CODE: name = input("Enter your name: ") print("Hello", name) OUTPUT: Enter your name: Chuck Hello…
Q: 2)write program that input three number and find the minimum number? 3)write program that input…
A: Main algorithm:- if(a<b && a<c) cout<<a<<" is minimum "; else…
Q: Q13: Write a program to read X and print Sin X if X>0, square root X f X<0 and absolute X if X/2 is…
A:
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A:
Q: Write a program that asks user to enter a number. Then the program should print the sum of all…
A: Given: Write a program that asks user to enter a number. Then the program should print the sum of…
Q: WRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE…
A: Hey, thank you for your question. There are multiple subparts submitted to your question. As per our…
Q: 6. Write a program to read a number representing the time in 24-hours (i.e., 4-digits ). Then find…
A: import java.text.SimpleDateFormat;import java.util.*;import org.apache.commons.lang3.time; class…
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: E2.11 Write a program that asks the user to input • The number of gallons of gas in the tank • The…
A: As Language is not defined i'm going to do it in C++
Q: Q1: Write a program that input four grades for six students and output a. The grades summation for…
A: #include<iostream.h>#include<conio.h> #include<dos.h> void main ( ) {…
Q: 5. Write a program that reports whether someone is eligible to run for president in the U.S. You…
A: According to the information given:- We have to create a program to satisfy the output.
Q: Write a program that accepts an integer number and determines whether the number is "EVEN" or "ODD.…
A: ALGORITHM:- 1. Take input for the number from the user. 2. Check if the number is even, odd or zero.…
Q: Write a program to have the user guess a number stored in the program. If he guesses right, tell him…
A: While doing programming in any programming language, you need to use various variables to store…
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: #include <stdio.h>void quadrant_of_x_y(float x, float y){ if (x > 0 and y > 0)…
Q: C++: Write a program that prompts the user to enter the weight of a person in kilograms and outputs…
A: C++ used to answer this question
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: Write a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Required: Write a program that reads from the user the initial Kilometers of the car, the current…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Q: Write a program that asks the user to enter a signed number and read it. Then display the content of…
A: Note: Since no language is mentioned # Input the number sign = int(input('Enter the signed number…
Q: Write a program to calculate electricity bill charged to a consumer. Ask him to enter the units…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Step by step
Solved in 4 steps with 3 images
- Write a program that prompts the user to enterthe month and year and displays the number of days in the month. For example, ifthe user entered month 2 and year 2012, the program should display that February2012 has 29 days. If the user entered month 3 and year 2015, the program shoulddisplay that March 2015 has 31 days.2. Develop a program which allows the user (Student) to enter three marks. The program determines the maximum of the three marks and then displays a message based on the folowing table: |Range of Marks Message to be displayed Enter three marks which are below 70 Got Fail Enter three marks which are above 90 Got S Grade Enter three marks which are above 80, but Got A Grade less than 91 Enter three marks which are above and Got B Grade equal to 70, but less than 81 Maximum mark range is 100 Implement the above program using friend class concept.A. Write a program that asks the user to enter a number of seconds.• There are 86400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86400, the program should display the number of days in that many seconds.• There are 3600 seconds in an hour. If the number of seconds entered by the user is less than 86400, but is greater than or equal to 3600, the program should display the number of hours in that many seconds.• There are 60 seconds in a minute. If the number of seconds entered by the user is less than 3600, but is greater than or equal to 60, the program should display the number of minutes in that many seconds.B. Write a function named biggest that receives three integer arguments and returns the largest of the three values.
- 3. Write a program that picks a random number between 1 and 100 inclusive. It then prompts the user to guess the number. If the user guesses the number, print out a congratulatory message and exit. Otherwise, indicate whether the guess was low or high and ask the user to try again. Hint: Use the rand() function.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 will then ask for the prelim grade, midterm grade and final grade of the student. The program should only accept grades 100 and below. After getting the three grades, the program should compute for the semestral grade. The computation of the semestral grade is as follows: 30%*PrelimGrade + 30%*midtermgrade + 40%finalgrade After inputting all the grades, the screen should clear again and will proceed to another screen.
- Write a program will then ask for the prelim grade, midterm grade and final grade of the student. The program should only accept grades 100 and below. After getting the three grades, the program should compute for the semestral grade. The computation of the semestral grade is as follows: 30%*PrelimGrade + 30%*midtermgrade + 40%finalgrade After inputting all the grades, the screen should clear again and will proceed to another screen. Use C ++ program, cin, cout, and iostream.Write a program that asks the user to enter a person’s age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult.Following are the guidelines: • If the person is 1 year old or less, he or she is an infant. • If the person is older than 1 year, but younger than 13 years, he or she is a child. • If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. • If the person is at least 20 years old, he or she is an adult.Write a program that asks the user to enter 2 integers of 4 digits and displays thedifferent digits as X and * if they are the same. If the user enters a number which is notof four digits, then a convenient message is displayed.
- 6) Write a program to guess a number chosen by the user. In this program a user will choose asecret number from 1..maximum. The program will prompt the user for the maximum value,which the user will enter. The program will then make a guess as to the value of the secretnumber, and prompt the user to say if the actual number is higher, lower, or correct. Thecomputer will then guess another number until it guesses the correct secret number.1. 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…QUESTION 7. Write a program that reads multiple integers from the user and finds the largest value. The program should ignore negative values and print a message indicating so. The sentinel is -1. If no valid input is entered, the program should print a message indicating so, like the second sample below. Use a flag variable that indicates whether valid input has been entered so far or not. Enter integer: 4 Enter integer: -5 >>> Invalid input! Enter integer: 20 Enter integer: 12 Enter integer: 7 Enter integer: -1 The largest value is: 20 Enter integer: -5 >>> Invalid input! Enter integer: -20 >>> Invalid input! Enter integer: -1 No valid input was entered!