Write a program to enter any number of the year and month, and then determine whether the year is a leap year or not and the number of days for that month. Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 days, No. of month 4, 6, 9, 11= 30 days, No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year) %3D
Q: The annual rate of inflation is the rate at which money loses its value. For example, if the annual…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function.…
A:
Q: Complete the following program that finds which of the time points comes last. The time is expressea…
A: correct statements are: time1="12:00"time2="00:55"hh1,mm1 = time1.split(":")hh2,mm2 =…
Q: Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents.…
A: Program: //Include necessary header files #include <iostream> using namespace std;…
Q: The power of the microwave can be calculated as follows: Power=Work/Time Work is measured in joules…
A: code: #include<iostream> using namespace std; //main method int main() { //variable…
Q: ve integers are called amicable if the sum of divisors of the first is equal to the sum of the…
A: I have provided java code in step2
Q: Write a program that displays all the leap years, ten per line,from 2014 to 2114, separated by…
A: Since the Programming language is not mentioned in the question, we will answer this question in…
Q: Modify the above program to compute the side area, total area, and volume of a cylinder and the area…
A: PROGRAM STRUCTURE: Include the required header files. Write the definition of the first function.…
Q: Suppose you have a certain amount of money in a savings account that earns compound monthly…
A: Inorder to give user the option if he wants to use the service again I have used while loop logic at…
Q: Given an a dollar amount Write a program to convert it into Maximum number of bills to give * 100s,…
A: Source Code dollar.cpp #include<bits/stdc++.h> using namespace std; int main(){ int…
Q: Write a program that reads in an investment amount, the annual interest rate, and the number of…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that determines a student's grade. The program will read three types of scores…
A: The program is written in C++ Language. Check the program screenshot for the correct indentation.…
Q: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Given: To Write a Java program to test if 2 integer numbers are amicable. For example, 220 and 284…
Q: Write a program which asks for user's age and prints a statement whether the user can vote in US…
A: As programming language is not mentioned, we are providing answer in C++ language.
Q: Write a program that asks the user to enter the coordinates of 4 points that draw two different…
A: 1)Take input of coordinates for two lines into list 2) calculate slope of two lines 3) based on…
Q: Modify the above program to compute the side area, total area, and volume of a cylinder and the area…
A: The program is written in java
Q: Please help me solve this problem
A: Note: The Python program is coded as the user requirements.In Python, code indentation is very…
Q: Write a program thatreads in investment amount, annual interest rate, and number of years and…
A: Program Plan: Import java util.scanner which contains utility classes for scanner object create the…
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: As no programming language is mentioned, it is solved using basic C++
Q: rite a program to enter any number of the year and month, and then determine whether the is a leap…
A: Note: Since you have not provided the language to write the code so I am using java language to…
Q: Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we…
A: Given, d=0.5×g×t2 g=9.8 meters/second2 Program description: t is the user input integer variable…
Q: Write a program that finds the day of the week for any given date using Zeller’s congruence. Zeller…
A: Objective: In the solution of the problem, first we read the date then check if the month is 1 or 2…
Q: Write a program that checks to see if the user won the lottery. Assume the winning lottery numbers…
A: Write a program that will generate the following output using the given conditions: Test Case 7…
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: Program: quarters = 0 dimes = 0 nickels = 0 pennys = 0 print("Please enter aomunt in the…
Q: Q4 write a program that accepts a day, month and year then calculate the day of year corresponding…
A: Given requirement, Write a program that accepts a day, month and year then calculate the day of the…
Q: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) here time2 comes first means hh1 > hh2 because as hh2 is come first it will must be less…
Q: Write a method named presentValue that performs this calculation. The method should accept the…
A: We know that the amount we get for a principal P after t years is P + PTR/100 So, according to the…
Q: Write a program that finds the negative integer solutions of the following equation ax³ + bx² + cx'…
A: The objective of the given problem is to find the negative integer solution in the range of -200 to…
Q: A. Sum of Others: Write a program called sum_of_others.py Given three numbers x, y, z, determine if…
A: Steps in program: Take x, y, z as input Check using if-elif-else statement whether any two are sum…
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: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Amicable Numbers: Amicable numbers are two numbers that are equal to the sum of their respective…
Q: Write a program to enter any number of the ycar and month, and then dutermine whether the ycar is a…
A: You have not specified any programming language so, I have used C++ Language and provided program…
Q: Write a program with C++ that reads in investment amount, annual interest rate, and number of years,…
A: C++ program to calculate the future invest value from the given value , Investment amount , Monthly…
Q: Write a program to enter uny number of the ycar and month, and then dutermine whether the ycar is a…
A: Since the question did not say which programming language to be used ,C++ language has been used to…
Q: Write a program that randomly generates an integer between 1and 12 and displays the English month…
A: We create a variable 'num' to store a random number created. We use a switch-case for each num…
Q: Write a program using else if to input the number of students(stu) and number of teachers(tea) in…
A: C used to answer this question
Q: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Hello Student. Warm welcome from my side. Hope you are doing absolutely amazing. As you have not…
Q: Write a program that works out if a given year is a leap year This is how to workout whether if a…
A: Code: function leapYear_697(year){ return (year % 100 === 0) ? (year % 400 === 0) : (year % 4 ===…
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: Complete the following program that finds which of the time points comes last. The time is expressed…
A: The answer is given below according to the sequence.
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Program in java for calculation of monthly and total payments for each interest rate. import…
Q: Write a program that converts c) 12-hour time to military time to and d) military time to 12-hour…
A: #asking user to enter time gettime = input('\nplease enter Time in 12 hour format (eg; 3 14 pm): ')…
Q: Two
A: import java.util.Scanner; public class Main{ public static void main (String args[]) { int…
Q: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) in if condition it will print that time1 comes first means hours of time1 must be less then…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: Flowchart:
Q: Write a program to enter any number of the yoar and month, and thon dutormine whether the ycar is a…
A: Using C++ language
Q: The dynamics of a comet is governed by the gravitational force between the comet and the Sun, f=…
A: I give the code in Python along with output and code screenshot
Q: You have 3 buckets, the first of size 4 gallons, the second of size 10 gallons and the third of size…
A: Question:
Step by step
Solved in 4 steps with 5 images
- Write a program that computes the amount of calories burned when you run. Your program should ask for the duration of the run in minutes the speed of the run in mph and your weight in pounds. Compute the amount of calories burned and print it. The calories burned is computed using the expression below: \n", "\n", "$$ calories/minute = (MET*weight*1.6)/200 $$\n", "\n", "MET is a value given below:\n", " - if speed is 5mph or less - MET = 8\n", "- if speed is greater than 5 and less or equal 8 mph - MET = 11.5 \n", "- if speed is greater than 8 and less or equal 10 mph - MET = 14 \n", "- if speed is greater than 10 mph - MET = 20\n", "\n", "Remeber to multiply this result by the time running to show the total amount of calories burned.\n"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 translates a letter grade into a number grade. Letter grades are A, B, C, D, and E, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by O.3, a – decreases it by 0.3. However, an A+ has value 4.0. Enter a letter grade: B- The numeric value is 2.7.
- 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 asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount.Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on.Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount.Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. Write a program that prompts for weight in pounds and height in inches, converts the values to metric, and then calculates the BMI.Note: 1 pound is 0.453592 kilograms and 1 inch is 0.0254 meters.
- Write a program that works out if a given year is a leap year This is how to workout whether if a perticular year is a leap year on every year that is evenly divisible by 100 except every year that is evenly divisible by 100 unless the year is also evenly divisible by 400 Note Study the flow chart given below START No Yesit cleanly divisible by Not Leap No Yes it cleanly divisible by 1007 Leap No Yes it cleanly divisible by 4007 Not Leap Leap Guideline : Create a unique code Create a function leapYear_697 to accept the parameter (i.e year ) and return whether the given year is a leap year Javascript program name should be like Assign2 697Write a program that reads the amount of a monthly mortgage payment andthe amount still owed—the outstanding balance—and then displays theamount of the payment that goes to interest and the amount that goes toprincipal (i.e., the amount that goes to reducing the debt). Assume that theannual interest rate is 7.49 percent. Use a named constant for the interest rate.Note that payments are made monthly, so the interest is only one twelfth ofthe annual interest of 7.49 percent.write a program that enters an individual's year of birth and the present year and calculate and return the individual's current age
- Write a program that checks to see if the user won the lottery. Assume the winning lottery numbers are 8, 13, 27, 53, and 54. Ask the user for five numbers and compare those numbers to the winning numbers to determine how many matches the user got. In a lottery, the order of the numbers doesn't matter.Write a program that calculates the attendance percentage for students, there are total 120 working days in a semester, you are required to ask 100 students the days they attended university, then calculate the percentage it makes. If the percentage is above 75, then display that he is eligible to sit in examination, if not display that he will not get admit card to sit in exams. In the end calculate how many students were eligible to sit in exams.Write a program that calculates a weekly wage, based on an hourly payrate and how many hours were worked; then amounts for various categories of spending need calculated, along with how much of the weekly pay is leftover. • Tax = 15% • Shopping = 20% • Entertainment = 10% • Savings = 25% • Remainder = 30% (or you could subtract to find what’s left) In c++