Write a program c++ to enter any number of the year and month, and then determine whother the year is a leap year or not and the number of days for that month. Note: 1. of month 1, 3, 5, 7, 8, 10, 12 31 days. 2. of month 4, 6, 9, 11-30 days. 3. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year)
Q: Write a C++ program that reads student scores, determines the best score, and assigns grades using…
A: ALGORITHM:- 1. Take input for the number of student marks. 2. Create a marks array of that size. 3.…
Q: write a program in c++ to print the numbers bertween 1 and 50 that are divided by 3 using while…
A: Flowchart of while Loop
Q: Write a C program that will ask the user to enter the lengths of a femur bone and a humerus bone…
A: Required:
Q: Write a program in C++ so that when you write any number starting from 1 to 12, the Gregorian month…
A: Step-1: Start Step-2: Declare a variable n Step-3: Input a number and store in n Step-4: Switch…
Q: 1. Write a C++ program which take number of consumed units as input and calculate the electricity…
A: Define header file <iostream> for i/o operations. Define main() function. Define variables…
Q: Write a program in C++ to read a student's grades in four subjects (83,74,68,95) and calculating and…
A: C++ program to solve the given problem is below.
Q: Develop a C program that computes the different roots in a quadratic equation, ax + bx?=0. r= -b + y…
A: Step-1: StartStep-2: Declare variable a, b, c, discriminant, x1 and x2Step-3: Take input from user…
Q: Use C++ Write a program with total change amount as an integer input, and output the change using…
A: #include <iostream>#include <vector>#include <sstream>using namespace std; void…
Q: Write a program c++ to calculate the value of purchases of a specific product. The value of one…
A: Given: Write a program c++ to calculate the value of purchases of a specific product. The value of…
Q: Write a program in C to calculate and print the Electricity bill of a given customer. The customer…
A: #include<iostream>using namespace std;int main(){ int customer_id, units; string name;…
Q: Q1. Write a program in C++ language to evaluate this equation: i? + cos j-j mod 3, if i5 y = (sini+;…
A: Program: #include <iostream> #include <cmath> #include <bits/stdc++.h> using…
Q: want the solution that setups midnight time to 0, and then compare to that to get difference for…
A: Here have to determine about function of computeDifference in c++.
Q: Write a program in C that asks the user to enter a number of seconds and works as follows: • There…
A: Here we are given user input in seconds. We need to convert it into days, hours , minutes, seconds.…
Q: Write a C ++ program which take number of consumed unit as input and calculator the electricity bill…
A: Sample Response: //C++ program to calculate the electricity bill#include<iostream>using…
Q: Write C Program that receive number of students in a Lecture, and decide how much form of exam…
A: logic:- read number of students read width and height of lecture hall. define sizeLecture(double…
Q: Write a C++ program to calculate and display the midpoint coordinates of the line connecting the two…
A: Answer c. Given coordinates, x1 = 3 y1 = 7 x2 = 8 y2 = 12 Formula to calculate midpoint of ( x1, x2…
Q: 3. Write a C++ program that find and print the value of Z, for the fallowing equations: *= 1 x+2 x=…
A: here is your code
Q: Write a program in C that check the given input number is perfect number or not.
A: /*Perfect number implementation in c*/ #include <stdio.h> void main() { int number,i; int…
Q: Q2) Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)?…
A: Algorithm: Start Input a, b, x, y Calculate w Print w Stop
Q: Write a c++ program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears…
A: i hope it will work for you #include<bits/stdc++.h>#define INF 1000000using namespace std;…
Q: Write a C program to count the number of occurrences of any two vowels in succession in a line of…
A: Hello student, hope you are doing good. The C code for the given problem is attached below along…
Q: Write a C- program that will calculate and print out bills for the city water company. The water…
A: Write a C- program that will calculate and print out bills for the city water company. The water…
Q: write a program in C++ that A user needs to determine the size of squares (let say delta) in a grid,…
A: Answer: our instruction is answer the first three subparts from the first part. we have done code
Q: From 2/ b/write a program in C++ language, to calculate the income tax for a person whose daily…
A: The program is written in C++. Check the program screenshot for the correct indentation. Please…
Q: 2. Write a C program to compute the telephone bill of a customer. Rates are as follows: No. of…
A: Ans: Code: #include <stdio.h> int main(){ double no_of_calls; double rate;…
Q: Employees in a company receives net salary after the deductions for tax, Staff Provident Fund (SPF),…
A: - We will take the input salary - We will apply the conditions as requested - Calculate the actual…
Q: Write a c++ program to read 20 different numbers and find the maximum number among them? then if it…
A: Algorithm: Start Read 20 numbers in an array Take first element in the array as max Iterate…
Q: Write a C++ program that accepts an amount of money on deposit and a number of years it has been on…
A: #include<iostream> using namespace std; int main(){ float amount,interst,years;…
Q: Write a C program to input number from user and check whether number is Strong number or not.…
A: Here program in C to check whether a number is strong number or not user has to input the number…
Q: Write a complete program in C# to calculate and print the Internet bill of a given 10 customers. At…
A: Arrays are linear data structures that hold data of the same data type. Each element is sequentially…
Q: Please write a C-program that first reads an integer representing the current population of the…
A: The C program is given below with code and output screenshot All the Best ?
Q: Write a c++ program to display a calendar for a given year. Type of Branches such as switch…
A: A required C++ program is as follows, #include<iostream> #include<iomanip> using…
Q: Write a C++ program that accepts an integer number and prints the following: Sum of odd factors of…
A: We will write C++ program to solve this problem.
Q: Write a complete C++ program that allows user the ability to enter an integer in the range of some…
A: 1)Prime numbers, with only two variables: 1 and the number itself, are cumulative numbers greater…
Q: 1. Write a C++ program to compute the following series. The value of n should be determined by the…
A: 1)Code: #include<iostream>#include<cmath>using namespace std;int main(){ //declaring…
Q: Write a C++ program that will repeatedly ask the user to enter an integer quantity of liquid given…
A: Program Explanation: The header file “<iostream>” is declared that contains all standard…
Q: 3. Write a C++ program that find and print the value of Z, for the fallowing equations: x = 1 x + 2…
A: take values of x from user. apply if else to find value of z.
Q: Write a program in C to compute the roots of a quadratic equation (ax² + bx + c = 0). The roots of…
A: We have to write a c program to compute the roots of the quadratic equations.
Q: Write a C program that will calculate the total payment for a brand new car being purchased on…
A: C program: C is a programming language developed by Dennis Ritchie at AT & T Bell Laboratory in…
Q: Write a C program that gets the input number from user and finds the integer square root at number…
A: The required code is as follows
Q: Write a C program that prompts the user to enter a number that represents his/her type as follows:…
A: Code and sample output is in step2.
Q: WRITE A PROGRAM IN C++ TO CALCULATE THE SIMPLE INTEREST ON A LOAN AMONUT OF 50000 GHANA CEDIS AT AN…
A: Program: //Header file #include<iostream> //Using namespace using namespace std;…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: In this user has to enter customer id Name and unit consumed then according to unit find the rm…
Q: Q1. Write a program in C++ language to evaluate this equation: i? + cos j - j mod 3, if i 5 y = sin…
A: #include <iostream>#include<cmath>using namespace std; int main(){ //declaring…
Q: write a program in c++ Type equal to 'G', If classification is equal to 5 then set the character…
A: #include <iostream> using namespace std; int main(){ int classification; cout <<…
Q: Write a program in c++ to read the radian of a circle, check if it is bigger than zero, and if it is…
A: ask the user to give the radius of the circle as input pass the radius as to the function called…
Q: 3. Write a C program to accept a discount percentage on mobile prices between 0 to 100 from the user…
A: Introduction: In this question, we are asked to write a C program to calculate the average discount…
Q: Write a program c++ to enter any number of the year and month, and then determine whether the is a…
A: Required: Write a program c++ to enter any number of the year and month, and then determine whether…
Q: are as follow: Unit Charge/unit upto 199 @1.20 200 and above but less than 400 @1.45 400…
A: EXPLANATION Read the input using readline(); Use if-else if statement to implement all the…
Q: Write a program that will calculate and print bills for the city power company. The rates vary…
A: The C++ program with the given description will be created as follows: Declare int variables for ID…
Write a program c++ to enter any number of the year and month, and then determine whother the year is a leap year or not and the number of days for that month. Note:
1. of month 1, 3, 5, 7, 8, 10, 12 31 days.
2. of month 4, 6, 9, 11-30 days.
3. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year)
Step by step
Solved in 3 steps with 2 images
- Write 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 thatreads in investment amount, annual interest rate, and number of years and displaysthe future investment value using the following formula:futureInvestmentValue =investmentAmount X (1 + monthlyInterestRate)numberOfYears*12For example, if you enter amount 1000, annual interest rate 3.25%, and numberof years 1, the future investment value is 1032.98.Here is a sample run: Enter investment amount: 1000.56 ↵EnterEnter annual interest rate in percentage: 4.25↵EnterEnter number of years: 1 ↵EnterFuture value is $1043.92Write 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.
- For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.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 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++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 computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.
- 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 enters an individual's year of birth and the present year and calculate and return the individual's current ageWrite 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.