Write a program which accepts days as integer variable and display total number of years, months and days in it. for example: If user input as 856 days the output should be 2 years 4 months 6 days.
Q: solution for this c++ program
A: C++ program
Q: Month Usage(kWh) Consumption(RM) 10% Discount(RM) 6% Tax(RM) Bill(RM) Jan 100 17.50 1.75 0.00 15.75…
A: #include <iostream>#include <iomanip>using namespace std; int main(){ int usage;…
Q: Create a class of any domain i.e. university, showroom, student, shop. Also mention attributes for…
A: ALGORITHM:- 1. Create class Student with 2 attributes id and name. 2. Create the constructor. 3.…
Q: + Program correctly please experts. I have given all the inf
A: Solve the following C++ Program correctly please experts. I have given all the information below…
Q: Complete a class so that main works with constructor, destructor, copy constructor, operator= and…
A:
Q: Is it You, Cody? Can you identify if Cody's name is spelled right? If so, then make a program that…
A: Please refer below for your reference: Language used is C++: #include <iostream>using…
Q: 3. For three resistors connected in series, the total resistance is the sum of the individual…
A: Given: Resistors are connected parallel Therefore Total resistance is Total Resistance =…
Q: Write a complete program for a Class Record System. Create 6 one-dimensional arrays, namely : SN[50]…
A:
Q: Write a class Point that represents a point in 3D cartesian coordinate system. Use Constructors or…
A: To calculate distance: (x2-x1)2+(y2-y1)2+(z2-z1)2 For point P1 distance: (x1,y1,z1) = (0,0,0) and…
Q: Create 4 arrays of type integer having size of 11 and assign values to only 2 arrays using for loop.…
A: Note : Here I have taken the same values as given in the picture as input from user. Algorithm :…
Q: Create a class Employee with name, Id and salary as data members. Provide appropriate constructors,…
A: Given:-
Q: 4. Create a class called "MyClass" 5. Create an object called "myObj" in main and access the…
A: A class is declared and then an object is created and then multiple objects Then, respective…
Q: PROBLEM M5B-3: Write a complete program (Filename : ARRAY_M5B_3 ) that will load a Two-Dimensional…
A: An array is a linear data structure where the elements occupy contiguous locations in memory. All…
Q: Produce an equation that asymptotically describes the following algorithms runtime: define…
A: - We need to provide the asymptotic equation that will describe the complexity of the provided code…
Q: please help me solve this problem in C++
A: Program AlgorithmDeclare the required variables and an array.Then write a for loop to generate three…
Q: Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are…
A: Here I have taken the day and vacation as input from user. Algorithm : Step 1 : declare required…
Q: Can someone answer this in c++ ( be as descriptive as possible)
A: C++ solution for the given question
Q: Q4- Write a C++ Program to Find the Sum Above and Below of Main Diagonal Matrix 1 2 3 N 4 5 6 7 8…
A: #include <iostream>using namespace std;int main(){ int n; //reading size of matrix…
Q: Factorial of a Number Write a C++ Program to find Factorial of a number using class. int main() is…
A: #include<iostream> using namespace std; class factorial { private:…
Q: Write a program that reads an array of the following structure and sorts the data in ascending order…
A: Following is the C++ program for given problem:
Q: Write a program that reads a sentence as an input from the user until a period (.) is entered (which…
A: given - we have to take an input as a sentance from user. we have to create a program which count…
Q: 2. Write a C++ program to sum values of an array. 4. Write a C++ program to calculate the average…
A: Actually, program is a executable software that runs on a computer.
Q: Solve the following C++ Program correctly please and time is less so solve it quickly.
A: Class is an abstract data type that is used to create a user-defined data type that encapsulates the…
Q: Test cases: 1. Your program needs to prompt the user for an input string (i.e., Harry, hairy, hare,…
A: #inсlude <iоstreаm>#inсlude <string>#inсlude <iоmаniр>#inсlude <veсtоr>…
Q: Question#01. Create a class Mixed to represent a mixed fraction having data members middle, upper,…
A: Swapping two numbers: The swapping or exchanging two numbers with the help of the third variable…
Q: Implement function getPercentage that takes two inputs : grade and totalGrade and outputs the grade…
A: Create 3 User defined Exceptions inheriting from run_time error Assign the string to what message so…
Q: Write a program to illustrate the Ohm's Law, I-V/R. The program will first request to input an…
A: The source code of the program #include <iostream>#include <iomanip>#include…
Q: Your cell phone rings. Print "Answer it!" if you should answer it and "Don't answer it!". Normally…
A: Given data is shown below:
Q: The Positive Ones There are different kinds of numbers, but among them all, the most commonly used…
A: As given, we need to write a C++ program that takes four numbers as input and count all the positive…
Q: ode this in C++ with algorithm, comments
A: C++ Program for above : #include <iostream> using namespace std; int main() { //get n…
Q: QUESTION 1 PROBLEM: Write a program which accepts a number corresponding to a plane figure: 1. Right…
A: C++ program to find the area ,perimeter and circumference of Circle ,Traingle and Rectangle
Q: D- Write a program to find y, where y = 2x² + 3x - 1 1-x
A: The following are steps needs to be taken for the given program: First, we will declare a float…
Q: Question: Create a structure called employee that contains two members: an employee number (type…
A: In the c++ program, include the necessary libraries and then create a structure named 'employee' in…
Q: 5. Write a main function that does the following: a) Request a full name of your favorite US…
A: #include <bits/stdc++.h>using namespace std; int main(int argc, char const* argv[]){ string…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- 1. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay shouldbe (40 *12) + (1.5 *12 * (60-40)) = $840.Write a program that requests the floating number of hours a person works in a given week and the person’s hourlywage as input, and then displays the person’s gross pay. Save it as overtimePay.pyWEEK 4- EXERCISES 1: Write a program that will calculate your electric bill. You are to input the number of kilo-watt hours (kwh) used in a 30 day billing period. Electricity costs 0.0672 TL per kwh for daytime, 0.1127 TL for peak time and 0.03679 TL for night time. A state tax of 12% and a city tax of 4.5% are also added to the bill. IF the total of all periods are bigger than 500 kWh, the the cost per kWh will be 0.2719 TL Write a program that accepts the number of hours used per period, along with your Electricity Number (6 Digits), social ID number, zip code, telephone area code and telephone number. The program is to print a display with the following layout: Please enter your first letter of Name Please enter your first letter of Surname Please enter your Electricity Number Please enter your Phone Area Code Please enter your Phone Number Please enter total day-time kW in a month Please enter total peak-time kW in a month Please enter total night-time kW in a month :T :0 : 1026897…Submit your answer in the comment section. Days of the Week Write a program that asks the user for a number in the range of 1 through 7. The program should display the corresponding day of the week, where 1- Monday. 2- Tuesday and so forth. If the user types in a 6 then "Saturday should be printed on the screen. For help with Input statements see: Input Function • The program should print an error message if the user enters a number that is outside the range of 1 through 7. For help with If statements and conditions see the following pages: If-Eke Statements and Operators • Name the source code file yourName HW4_1.py. • Test and run the program. Capture the output console and save it as an image file named yourName Hw3 output4 1jpg. • Submit the py and the image files through Canvas.
- need help!Exercise 4: Selection and loop statements A certain professor gives 5-point quizzes that are graded on the scale 5-A, 4-B, 3-C, 2-D, 1- F, 0-F. Write a program that accepts a quiz score as an input and prints out the corresponding grade. The input data must be a float numbers and between 0 and 5 Example Input : Quiz score: 3 Output: The grade is C. Exercise 4 Write an improved version of the future value program from Chapter 2. Your program will prompt the user for the amount of the investment, the annualized interest rate, and the number of years of the investment. The program will then output a nicely formatted table that tracks the value of the investment year by year. Your output might look something like this:Body Mass Index (BM) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Interpretation Underweight Write a program which prompts the user to enter the weight in kgs (integer value) and height in feet and inches (both integers) and then calculates the BMI of the person. Your program first need to convert inches to meters (L.e. inches 0.0254) and then use the following formula to calculate BM weight kilogram/ (height meter) 2 5 Your program displays the BMI value in two decimal places and the corresponding status as shown in the examples below. Note that one inch is 0.0254 meters and 1 foot is 12 inches. For example: Input Result 62 10 89 6 45 BMI BMI < 18.5 185 BMI <25.0 25.0 < BMI <30.0 30.0 s BMI 5 7 Normal Overweight Obese 82 2 Enter weight (kg): Enter height (feet): Enter height (inches): BMI is 19.61, Normal Enter weight (kg): Enter height (feet): Enter height (inches): BMI is 26.61,…
- PythonTask 3: Find the numbers that can be expressed as the product of two nonnegative integers in succession and print them in increasing order. For each number found the program should check whether the number is a multiple of 5 and indicate this in the output. (For example, 30 is such a number as it can be written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should specify how many such numbers they want to print. Your application should be user friendly. First, you create an initial menu that the user sees when they execute the application. The menu should display the list of operations (the three tasks) that the application can perform. In your menu design, if user enters M or m, the application should print a list of the multiples of the number The user specifies how many numbers to print. The program should display the user’s selection before printing the output. If the user enters a selection which is different from the choices offered, the…Python question
- (Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.(Modify) a. Modify the program you wrote for Exercise 7 to provide the mass of a person as an output, given his or her weight as an input to the program. Use your program to determine the mass of a person who weighs 140 lbf on Earth. b. Modify the program written for Exercise 7a to also output the person’s weight on Mars and the moon. The pull of gravity on Mars is 12.54ft/sec2=3.728m/s2,andonthemoonis5.33ft/sec2=1.625m/s2.(Misc. application) a. Write a program to reverse the digits of a positive integer number. For example, if the number 8735 is entered, the number displayed should be 5378. (Hint: Use a do statement and continuously strip off and display the number’s units digit. If the variable numinitially contains the number entered, the units digit is obtained as (num % 10). After a units digit is displayed, dividing the number by 10 sets up the number for the next iteration. Therefore, (873510)is5and(8735/10)is873. The do statement should continue as long as the remaining number is not 0.) b. Run the program written in Exercise 3a and verify the program by using appropriate test data.