A person tries to finish a 10000 piece puzzle and wants to know how much time will it take to finish it in total. "his person keeps track of how much s/he spent on the puzzle in each session, in hours and minutes. n order to calculate the total time, s/he has to build a complete C++ program. n this program, You are given the total number of sessions at first And for each session you are given hours and minutes spent by the user Vrite the definition for a class called Time that has hours and minutes as integer. The class has also the following member void setTime(int, int) to set the specified value in object void displayTime() to display time object Time sum(Time) to sum two time object & return time. For example: Input Result
Q: MY CODE WAS BELOW, Can you help me. CAN YOU HELP ME PROVIDE THIS OUTPUT? Create a nested looping…
A: As per the requirement program is completed. The given requirement is achieved by using basic nested…
Q: Q1 Given a set of dates and a set of expenses or withdrawals accordingly, the final amount should…
A: C++ program and pseudo code to calculate utilites bill and taxes
Q: With the help of c++, write a code that permits a user to input the surnames of 5 overall best…
A: In step 2, you will the C++ code. In step 3, you can see the sample output. In step 4, you will get…
Q: Do in C Program In the military, they have these military dogs that help them in their missions. To…
A: First let's understand what is enum in c programming . When we have to create some integer in c how…
Q: Need Help solving this in C++ language . Prompt for and get the user’s number of donuts to buy…
A: In this program, you need to take input from user for number of donuts and number of people. After…
Q: NOTE: in mathematics, the square root of a negative number is not real; in C++ therefore, passing…
A: A C++ program is to be created that will read the value for area of square and will print the…
Q: A mobile company charges the following rates to the user: For first 5 mins = $5 For next 10 mins =…
A: The input will be name along with minutes of usage and then final bill is calculated and displayed
Q: For the series circuit shown, V; the voltage drop, across resistor, across resistor R2, and the…
A: The inputs will be E, R1 and R2 Firstly we will calculate the I and the V2 and then P2
Q: Write a C++ program that displays a table of speeds in kilometers per hour with their values…
A: Following program will convert the values from Kilometers per hour(KPH) to Miles per hour(MPH)…
Q: You are required to produce a C++ program which solves the following: 1- A worker is paid according…
A: Given that You are required to produce a C++ program which solves the following:1- A worker is paid…
Q: Part1: • Write a program that presents to the users a choice of your 4 favorite beverages (Water,…
A: Here in this question we will be writing program which will simply ask user to enter his choice for…
Q: C program
A: Given :- The programming language is C and take integers between 1 and 7 as mention in the above…
Q: We calculate weight normally in the unit of tola. Write a C++ program to enter the amount of gold in…
A: #include<iostream> using namespace std; int main(){ float tola,grams,amount,zakat;…
Q: This is a C program. I want you to convert it to a C++ program. Also provide a screenshot that it is…
A: Here, I have to convert C code to C++ code for the above one.
Q: This is a C++ programming question The code should be in C++ language When you borrow money to…
A: Program: #include <iostream> #include <cmath> using namespace std; double…
Q: I want to solve the question in c++ please Modify your program to make the user enter a quantity…
A: #include <iostream> using namespace std;int input(){ int n; cin>>n; return n;}…
Q: The members of the board of a small university are considering voting for a pay increase for their…
A: Algorithm : Step 1 : declare arrays. Step 2 : declare variables. Step 3 : use for loop to ask for…
Q: this question using C++, please In this assignment, you will practice using the switch statement…
A:
Q: Please write a c++ programming code that can work on codechum according to the instructions below.…
A: Algorithm: Input the rate of consumption from the user Calculate the total cost as follows. If the…
Q: You are required to create a C ++ program to calculate the amount that you need to deposit today to…
A: Function presentValue definition and declaration with double F, double r, int n as a parameter.…
Q: Can you help me create a C Program that will input a value for a YEAR (integer) and output whether…
A: 1) Below is C Program that will input a value for a YEAR (integer) and output whether it is a "LEAP…
Q: First Aid are asked. Passing grade in driver's license exams is 70 out of 100. A student who scores…
A: // t refers traffic, e refers engine, f refers first //aid print("Enter the traffic wrong…
Q: I am trying to write a code in C++ to output the sum of the square of the odd numbers between 2 user…
A: The program is written in c++
Q: MY CODE WAS BELOW, Can you help me edit my code to provide the given output. Create a nested…
A: Algorithm: The algorithm to get given pattern is: Start Initialize the variables x, y for x=1 to 5{…
Q: You are asked to write a C program that will accept representing the number of dollars and cents to…
A: Program when only cents are given: #include<stdio.h>void convert(int change){int i;// required…
Q: Q3|\ A basin with a length of x? + 10 meters and a width of x + 3 meters and surrounded by a…
A: Input : Input value of x. Output : Value of total area.
Q: xyz is a telecom company,there are three recharge plans as listed below- 10$ - 50 Gb for 28 days…
A: Program Approach - Use the header files as per code requirements. Define the main function and…
Q: Write a c program that ask user to enter integer 10 numbers then find the numbers that greater than…
A: for (int i = 0;i<10;i++) { scanf(" %d",&arr[i]); } for (inti = 0; i < 10; i++) {…
Q: write a c++ program: Your time machine is capable of going forward in time up to 24 hours. The…
A: As you have not provided the sample output, so we have provided the output in most appropriate and…
Q: A wholesale furniture store that sells tables in bulk needs a program to help their cashiers. Write…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: You are required to produce a C++ program which solves the following: 1-A worker is paid according…
A: Code #include <iostream>using namespace std;int main(){ string name; //for input user…
Q: A dice is an n-sided shape with the sides labelled by numbers 1, 2, dice used to play various games…
A: Answer : SOURCE CODE IN C++: #include <iostream> #include <fstream>…
Q: Jason Hardy opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium…
A: Answer :- #include <iostream> #include <iomanip> using namespace std; //constants…
Q: Q6: Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap…
A: Leap Year Complete Program in Step 2
Q: . In the sport of diving, seven judges award a score between 0 and 10, where each score may be a…
A: The program defines two variables: difficulty: for deciding the difficulty of each dive.…
Q: Write C program which should print your name and registration number on the screen then do the…
A: Given: Product No. Product Name Retail Price in Rs. Quantity Available101…
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: Program in C: Create a program that tells you how much money you have left after some expenses. Use…
A: Program: //include the header file #include <stdio.h> //definition of "aaa" function int aaa…
Q: Write a C program that reads the values of z (integer) and y (integer) and then calculates and…
A: 1) read the integer value of z,y 2)call the calculate function with parameters as z and y which…
Q: You are required to produce a C++ program which solves the following: 1- A worker is paid according…
A: PROGRAM CODE: #include <iostream> using namespace std; float calculateTD(float income) {…
Q: calculate the total charges for the duration stayed at the hotel
A: Program: // C++ version 17// header files#include <iostream>#include <iomanip>using…
Q: Write a program that calculates a*, where a and x are provided as user
A: In this question, we are asked to write a C program in such way that user enter two number 'a' and…
Q: Hi. Can you solve this question? Write a c program dist.c that calculates the distance between two…
A: #include <stdio.h>#include <math.h> int main() { float x1, y1, z1, x2, y2, z2, distance;…
Q: 5. Write a C program that keeps a number from the user and generates an integer between 1 and 7 and…
A: Given: To write a C Code.
Q: Find the attached file.
A: Program Approach: Create variables and take input from user. Store entered values in an array. Ask…
Q: w would you calculate the time spent on this code by the program in user mode ?
A: To calculate the time taken by the program one can use clock(). The implementation of clock() is…
Q: Write a program in C++ that should calculate the insurnace for a house. use questions below to…
A: Algorithm 1. Input all required variables like the first name, last name, no. of people in the…
Step by step
Solved in 5 steps with 3 images
- write a program in C++ that A user needs to determine the size of squares (let say delta) in a grid, the center of the circle (does not have to lie on a grid but it can!) and the radius. (for example use "cin>>" ) Then you need to plot a circle using parametric equations of circle (you need to increase angle and plot these (in my picture black) points). First plot the first point of the circle and determine in which square of grid it is. (in my picture it is an orange square) and plot the left bottom vertex of this square (in my picture it is a blue point). Then increase an angle and plot next point of circle - check if it lies in different square. -If it is not in different square, you need to increase angle and check again. (because an angle was too small) -If it is the different square, then check, if this square has THE COMMON EDGE with the previous one -> if it has the common edge, then print new left bottom vertex of this square (if does not have common edge,…Please write a C-program that first reads an integer representing the current population of the city, and that next reads a decimal number for the projected population growth as a percentage (either positive or negative). The program should then display the expected population of the city in a year as a whole number. By convention we will only consider "whole" people. So a population of 31.8 inhabitants will be considered as having 31 inhabitants. Example Input: 1237.0 Output: 1312 When you deposit money in a savings account at a bank, the bank pays you interest on that money. If the bank computes the interest and adds it to your account once every year, the bank compounds interest annually. If you deposit p dollars, the money in your account after n years at interest rate r is : p(1+r)n Create a WCF service for that question, write a C# program that asks the user for the initial amount, the interest rate and the number of years. and then displays the balance after that many years. Do not hard code any variable values. The client will be prompted for any required variable values.
- Write a C++ program that tells the user that the number entered is less than or greater than 10? Write a C++ program that tells the user that the number entered is even or odd? Write a menu driven C++ program that ask the user to choose the type in which he wants the output? Either he wants to convert the entered Celsius temperature in to Fahrenheit or Kelvin?CODE USING C++ Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will hit the jackpot in a casino? In the same manner, let's make a program that will test if a certain 3-digit number hits a jackpot or not by identifying if all the digits of a given number is the same as the second inputted number. If it is, print "Jackpot!"; else, print "Nah". Let's try this out now! Input A line containing two integers separated by a space. 777·7 Output A line containing a string. Jackpot!Write a c++ program for a bank in your town that updates its customers’ accounts at the end of each month. The bank offers two types of accounts:savings and cheque. Every customer must maintain a minimum balance.Minimum balances for the accounts are: Savings : R 1000.00 Cheque: R 1500.00If a customer’s balance falls below the minimum balance, there is a service charge of R50.00 for savings accounts andR100.00 for cheque accounts. If the balance at the end of the month is at least the minimum balance, the clientreceives interest as follows: Savings accounts receive 4% interest on the balance. Cheque accounts with balances of up to R 5000.00 more than the minimum balance receive 3% interest;otherwise, accounts with balances more than R 5000.00 more than the minimum balance receive 5% interest.Write a c++ program that requests the user to enter a customer’s account number (int type), account type (char type - S for savings, C for checking) and current balance. The updated balance must…
- Write a C# program that plays a guessing game with the user. Your program should select a random number between 1 and 50 and then let the user try to guess it. The program should continue asking the user for a number until he guesses correctly. (See below for some tips on random numbers). CHALLENGE #1: Modify your program so that it only allows the user 10 guesses, and then declares them to be an inadequate guesser if they haven’t gotten it correct. Your program should output the random number chosen. CHALLENGE #2: Modify your program so that after they guess a number (or get declared inadequate, if you do Challenge #1) that it asks them if they want to play again, and responds accordingly.In this assignment you will write a C++ program that can figure out a number chosen by a human user. The human user will think of a number between 1 and 100. The computer program will make guesses and the user will tell the program to guess higher or lower. A sample run of the program should look something like this, with the user inputs in orange: Think of a number between 1 and 100. Is it 50? (h/l/c): hIs it 75? (h/l/c): hIs it 88? (h/l/c): lIs it 81? (h/l/c): cGreat! Do you want to play again? (y/n): yThink of a number between 1 and 100. Is it 50? (h/l/c): lIs it 25? (h/l/c): hIs it 37? (h/l/c): cGreat! Do you want to play again? (y/n): n Notice that the user inputs the characters ‘h’, ‘l’, and ‘c’ for higher, lower, and correct, respectively. Every time the program makes a guess, it should guess the midpoint of the remaining possible values. Consider the first example above, in which the user has chosen the number 81: On the first guess, the possible values are 1 to 100.…In C++ Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%.Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000.Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information:Marital statusIf the marital status is “married,” ask for the number of children under the age of 14Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.)Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions:Function getData: This function asks the user to enter the…
- Write a C program that calculates and prints the bill for a cellular telephone company. The company offers two types of services: regular and premium, each with varying rates based on usage.The rates are computed as follows:Regular service:- $10.00 base charge with the first 50 minutes being free.- Charges for usage beyond 50 minutes are $0.20 per minute.Premium service:- $25.00 base charge with different rates for day and night usage: a. For calls made from 6:00 a.m. to 6:00 p.m., the first 75 minutes are free, and charges for usage beyond 75 minutes are $0.10 per minute. b. For calls made from 6:00 p.m. to 6:00 a.m., the first 100 minutes are free, and charges for usage beyond 100 minutes are $0.05 per minute.The program should prompt the user to enter an account number, a service code (as a character), and the number of minutes the service was used. A service code of 'r' or 'R' represents regular service, while 'p' or 'P' represents premium service. Any other character should be…Find the C program language Deal or No Deal?by CodeChum Admin When I was a kid, I used to watch this TV game show, Deal or No Deal? In the game, there are different brief cases, each labeled with a number. Inside each brief case is an amount in Pesos and the goal is to guess which briefcase contains the smallest amount. In this program, instead of just finding the smallest amount, your task is to ask the user for an integer input and print the values in the array smaller than the inputted integer. Instructions: In the code editor, you are provided with an array with 100 elements.Your task is to ask the user for an integer input and then print all the elements in the array whose value is lesser than the inputted integer.Input 1. Inputted integer Output Enter value: 6132450351503022244Write a c program that calculates the potential energy of 3 charges q1=1, q2=2, q3=3 located at points (1,2,3), (3,−4,−5), and (−4,2,−6) respectively. The units are coulombs forcharge and meters for coordinates. The energy is given by the expression; U=k(q1q2/r12+q2q3/r23+q1q3/r13) where rij is the distance between the charges qi and qj, and k= 9×109in SI units.Your program should print the result on the screen.