Write a program which asks for user's age and prints a statement whether the user can vote in US presidential election based on age.
Q: Write a program that calculates the change due a customer by denomination; that is, how many…
A: Answer is given below .
Q: Write a program that accepts a date in the form month/day/year and out- puts whether or not the date…
A: Algorithm: Check if the month, day, and year can be converted to ints Check if values are in…
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 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: Python Write a program that receives a number from a user and checks if it's float or integer. In…
A: a=float(a)if int(a)/a==1: if a%2 == 0: print("This is Integer and Even Number") else:…
Q: Write a program that reads an integer and checks whether the number is odd or even. You should use…
A: #include<iostream> using namespace std; int main(){ int n; cout << "Enter a…
Q: Write a program that will check and print if the person is a regular passenger, student or senior…
A: Program Code: #include<stdio.h>#include<conio.h>main(){ int ch,fare; printf("If you are…
Q: Write a program that accepts age in months, calculate and print number of days for the entered age.…
A: #include <stdio.h> int main(){ int age; printf("\n Enter your age in months: ");…
Q: Write a program that calculates a “moving (rolling) average” of ten integer numbers entered by the…
A: We need to write a Python code to find moving average.
Q: Write a program that prompts the user to enter the students’ names and their scores on one line, and…
A: Output:
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Program Explanation: Declare the header files Declare and define the function to compare two…
Q: Write a program that calculates the amount of money a person would earn over a period of time if his…
A: here in given question ask for python program.
Q: write a program to print the name of day when entering the number of the day. (For example, when the…
A: read a value convert it into int using Integer.Parse() if x=1 then display “sunday” else if x=2 then…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Note: as programming language is not mentioned c++ is used. The program with output is given below
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 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 reads two integer values from the user and then prints the Greatest Common…
A: We know that gcd of two number is (a*b)/LCM(a,b), where a and b is given number.
Q: Write a program that prompts the user to enter a time in seconds over 500 and then displays that…
A: you did not mention any programming language so i am solving this in java 1 first we have to take…
Q: Write a program that prompts the user to input a positive integer. It should then output a message…
A: Given The condition of a prime number and to do a program to check given number is prime or not.
Q: 9) Write a program that reads a temperature value and the letter C for Celsius or F for Fahrenheit.…
A: According to the question below the solution: Output:
Q: *Write a program that asks the user to guess your favorite number. The program should end when the…
A: Guessing a number will be done by using loop. IN the python programming language there are three…
Q: Write a program that reads non-negative integer number and determines whether it is odd or even or…
A: Here we will write a program that reads non-negative integer number and determines whether it is odd…
Q: Write a program to ask user to enter the marks of two subjects of student and calculate the gpa.…
A: Program Approach - Define the main function and declare the variables as per need. Prompt user to…
Q: Write a program that accepts two numbers and determines whether they are equal. If they are equal,…
A: According to the question: We have to write a program that accepts a number and determines whether…
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: Program converts the amount taken from user in dollars and cent and returns the amount of coins user…
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 two integers. The pro gram outputs how many numbers…
A: NOTE: -Below code is implemented in C++. PROGRAM EXPLANATION: - Integers num1 and num2 are declared…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Use an array to store individual digits of each number and then compare these two arrays bit by bit…
Q: Write a program that prompts the user to enter an integer and determines whether it is divisible by…
A: Since there is no programming language, below is the program in python.
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: #include <iostream>using namespace std; int main(){ int dollars, cents;…
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 takes in the user’s name and age. Then displays his/her name’s initial letter…
A: Algorithm: Start Var name, age Accept name from user Accept age from user Display(name[0]) Display…
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 prompts the user to enter the exchange rate from currency in U.S. dollars to…
A: Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to…
Q: Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Make a program that asks the user to type in his or her height, weight and age and then computes and…
A: #include <iostream> using namespace std; int main(){ float height,weight,age; float…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: Flowchart:
Q: Write a program that reads the following informa- tion and prints a payroll statement: Employee’s…
A: Lets see the solution.
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 ask the user to enter his/her letter grade and then respond with an appropriate…
A: grade = input("Enter your grade : ") #taking user inputif(grade == 'a' or grade == 'A'):…
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 accepts a number entered by the user and prints its Fibonacciseries up to 10…
A:
Step by step
Solved in 2 steps with 1 images
- Write 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 dayswrite a program that prompts the user to enter the number of students and each student name and score and finally display the name of student with highest score and the student with second highest score.Write a program that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average
- Write a program that prompts the user to enter the numberof students and each student’s name and score, and finally displays the names of thestudents with the lowest and second-lowest scores.Write a program that asks for the user's name and year of birth, greets the user by name,and declares the user's age in years. Users are assumed to be born between the years1800 and 2099, and should enter the year of birth in one of the three formats 18XX,19XX, or 20XX . A typical output should be "He llo Caroline, you are 23 years old ."Write an application that prompts for and reads the numeratorand denominator of a fraction as integers and then prints the decimal equivalent of the fraction.
- Write a program that asks the user how many credit units they have taken. If they have taken 23 or less, print that the student is a freshman. If they have taken between 24 and 53, print that they are a sophomore. The range for juniors is 54 to 83, and for seniors it is 84 and over.Write a program that accepts a number entered by the user and validates if it is odd oreven. If it is even, print a series up to 4 using range() and if it’s odd print a series up to 7.CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZENIF YES, THEN GIVE 20% OFF IF HE IS BOTH PWD AND SENIOR CITIZEN, GIVE 20% ONLY ASK IF HE HAS A MEMBERSHIP CARD. IF YES, GIVE ANOTHER 3% OFF
- Write a program that prompts the user to enter a time in seconds over 500 and then displays that time in minutes and seconds?Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car in miles per gallon, and the price per gallonthen displays the cost of the trip.write a program that enters an individual's year of birth and the present year and calculate and return the individual's current age