Q14/ If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of 4.5% of the money; otherwise, the interest rate is 3.0% of the money. Write a program in c++ to accept the number of years in the variable numYears and money in the variable money then display the correct interest rate, depending on the value input into numYears by using functions.
Q: Q1/ Use the structure Time to write a C++ program that inputs a time in hours, minutes and seconds…
A: #include<iostream> using namespace std; //Time Structure struct Time { int h,m,s; };…
Q: 1. In order to discourage excess electric consumption, an electrical company charges its customers a…
A: flowchart for problem 1 calculate electric bill
Q: 21. Write a C++ program in which the user enters the height in the format feet.inch and the program…
A: Write a C++ program in which the user enters the height in the format feet.inch and the program…
Q: 3. Farhan must pay a bill to a shopkeeper. The shopkeeper doesn't have any change, so Farhan must…
A: Given :- Farhan must pay a bill to a shopkeeper. the shopkeeper doesn't have any change, so Farhan…
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: USE C++ THANK YOU. 1. Write a parameter and return program that will require the user to enter a…
A: the code is an given below : 1) c++ program: #include <iostream> using namespace std; int…
Q: A company selling household appliances gives commissions to its salesman determined by the kind of…
A: Procedure Followed: Include header files. Start main method. Declare variables:…
Q: Write a C++ program that prompts the user to enter two integer numbers and the program should print…
A: Algorithm : - we will convert the inputed number to string - we will store the index of largest…
Q: Write a program in C ++ to evaluate the equation below : Y = 3 + sin x - x modulus2
A: In this program, I am taking user input for the value of x as double and then compute the value of Y…
Q: Question 2: Ali gives pocket money to his son in following fashion. Whatever pocket money is given…
A: Include the required libraries in the program. Declare the main function. Declare the variables of…
Q: 3. Using functions, develop a full C++ structured program that asks the user for his choics:1 or 2.…
A: Functions required:- convertToF() convertToC() Formula used f=(9/5)*c +32 Formula used…
Q: 1. Write a C program to input any number from user and find cube, square and square root of the…
A: The program prints Cube, Square and Square Root of the given number. It uses math.h library for…
Q: A temperature reading in degrees Fahrenheit can be converted to degrees Celsius using Write a…
A: #include <stdio.h>float convertCelFahrenheit(float f){ return ((f-32)*5)/9;}int main(){…
Q: Q3: Write a program of c++ that prints the day number of the year, given the date in the form…
A: PROGRAM: // defining header file #include<iostream> using namespace std; // declaring…
Q: Hello everyone. I have homework and I do but code is complicated for me. Homework. This program…
A: According to the question below the solution: Output:
Q: (a) ask the item price from the user (b) ask how many items to purchase for a specific item price…
A: As we are not sure about the number of items, to be added we can make use of loops to accept input…
Q: Question 2: Write a C program that asks the user to enter several amounts of water consumed in cubic…
A: PROGRAM CODE: #include <stdio.h> // include header file for standard input output…
Q: If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of…
A: CODE:- #include <iostream>using namespace std;void check(int numYears){ if (numYears >…
Q: Write a program in C to check a given number is even or odd using the function. (no return value no…
A: Read the input. Check if it is divisible by two or not. If yes then print the number is even. Else…
Q: 5. Write a C program to read sales amount and salary. calculate the bonus amount for employee using…
A: In the given program, the variables salary and sales_amt are used to store the salary and sales…
Q: user-defined function and appropriate conditional and looping statements, create a program using C++…
A: Explanation: Detail Code #include <bits/stdc++.h>using namespace std; int main(){ int…
Q: Using functions, write a program that will solve the problem: Create a program that will display the…
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2: Read…
Q: A management firm has 100 employees in total. The management firm increases the salary of the…
A: I have provided C++ CODE along with SCREENSHOT OF CODE WITH OUTPUT---------
Q: Using functions, write a full C++ program that reads four integer numbers entered by the user two at…
A: C++ Program for Above : #include <bits/stdc++.h> using namespace std; //SOP function int…
Q: Write a C++ program that asks for the user’s name and then the program will output the last 4…
A: C++ Programming-
Q: Q1) Write a C++ Program that input the distance in Centimeter, Meter, Kilometer, and then converts…
A: CODE IN C++ CONVERT CENTIMETER , METER, KILOMETER. #include <bits/stdc++.h> using namespace…
Q: Q3. Write a C program in which the user can enter his/her body temperature in Fahrenheit and the…
A: I give the code in C as per your requirement along with output and code screenshot
Q: Q2) A store asks you to write a C program to make cash payment easier for cashiers. Write a C…
A: We have to write a code about payment system
Q: QI- You have three figures: a rectangle, a circle and a square. The length of the rectangle is 20…
A: Given:
Q: Using user defined function and appropriate conditional and looping statements, create a program…
A: CODE:- #include<iostream>using namespace std;int payment(int tot){ int paym; do{…
Q: This program reads a number of up to 9 digits. It then prints the number in English. In other…
A: Coded using C++.
Q: The most common symptoms of COVID-19 are fever, dry cough, and tiredness. Other symptoms that are…
A: Required: Write a program in C++ to input the status of all these symptoms from a patient and…
Q: My homework This program reads a number of up to 9 digits. It then prints the number in English.…
A: C++ program to convert the given number to English word is given below.
Q: If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of…
A: PROGRAM CODE: #include <iostream> // include header file for input output streamusing…
Q: Q2. Write a C+ program that prompts the user to enter 3 number (x1,x2,x3) and compute and display…
A: The main objective of the program, avgstd.cpp to prompt the user to enter the three values and read…
Q: Write a C++ program that prompts the user to enter two integer numbers and the program should print…
A: The code and the output has been given in step 2.
Q: Assuming a frictionless environment, the velocity of an object, v, that is released from a…
A: Here I have created the function named velocity(). In this function, I have calculated the velocity…
Q: in C Write a program to calculate the size of a room and the costs to strip and sand, and seal it.…
A: 1) Below is C Program to calculate the size of a room and the costs to strip and sand, and seal it…
Q: Q.3) Use switch case to write a C++ program that shows three options for the user The first option…
A: According to the given question, it is required to determine the are of a circle and triangle as…
Q: Q2:- Write a C++ program of Length conversion which gives the option to the user to convert inches…
A: code for centimeter to inches : #include<iostream>using namespace std;double convert(int…
Q: Write a C++ function that returns how many digits in a string. For example, if you enter “This is an…
A: Required: Write a C++ function that returns how many digits in a string. For example, if youenter…
Q: Modify the craps program to allow wagering inside of C#, and explain each step (reject if you…
A: After updating the code, I have provided C# CODE along with CODE SCREENSHOT and OUTPUT…
Q: This program reads a number of up to 9 digits. It then prints the number in English. In other…
A: C++ program to convert the given number to English word is given below.
Q: Modify the craps program to allow wagering inside of C#. Initialize variable Balance to 1000…
A: Solution:: package april.april16; import java.util.Random; import java.util.Scanner; public…
Q: Using functions, write a full C++ program that reads four integer numbers entered by the user two at…
A: CODE:- #include <iostream> #include<stdio.h> #include <cstdlib> using namespace…
Q: Question The volume of oil stored in an underground 200-foot deep cylindrical tank is determined by…
A: #include <iostream>#include<cmath>using namespace std; int main() { float…
Q: Q1. Write a c++ program to calculate the bill after adding sales tax, if the basic cost is input by…
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other questions…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 6 images
- If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of 4.5% of the money; otherwise, the interest rate is 3.0% of the money. Write a c++ program to accept the number of years in the variable numYears and money in the variable money then display the correct interest rate, depending on the value input into numYears by using functions.PLEASE ANSWER USING C++ Program Specifications: Write a program to calculate U.S. income tax owed given wages, taxable interest, unemployment compensation, status (single or married), and taxes withheld. Taxpayers are only allowed to use this short form if adjusted gross income (AGI) is less than $120000. Dollar amounts are displayed as integers with no comma separators. For example, cout << "Deduction: $" << deductionStep 1 . Input wages, taxable interest, unemployment compensation, status (1=single and 2=married), and taxes withheld as integers. Calculate and output AGI (wages + interest + unemployment). Output error message if AGI is above $120000 and the program stops with no additional output. Submit for grading to confirm two tests pass.Ex: If the input is: 20000 23 500 1 400 The output is: AGI: $20523 Ex: If the input is: 120000 23 500 1 400 The output is: AGI: $120523 Error: Income too high to use this form Step 2. Identify deduction amount based on status: (1)…The volume of oil stored in an underground 200-foot deep cylindrical tank is determined by measuring the distance from the top of the tank to the surface of the oil. Knowing this distance and the radius of the tank, the volume of oil in the tank can be determined by using this formula: volume = π radius2 (200 - distance). Use this information to write a complete C++ program that asks the user to enter 10 values of radius and distance measurements, one at a time, and then the program calculates for each value entered the volume of oil in the tank Using a for loop. Finally, the program should display the all the inputted values and the calculated volume in the output screen.
- (Physics) A golf ball is dropped from an airplane. The distance, d, the ball falls in t seconds is given by the formula d=gt2, where g is the acceleration caused by gravity and is equal to 32ft/sec2. Using this information, write and run a C++ program that displays the distance fallen in each 1-second interval for 10 seconds and the total distance the golf ball falls at the end of each interval. The output should complete the following chartWhich of the following are correct C++ statements? (10) cout "Programming with C++!" endl; cout " Programming " " with " " C++" endl; cout " Programming" " with C++!" '\n'; cout "Programming with C++!' endl;(Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap years. For example, because 1600 is evenly divisible by 400, 1600 was a leap year. Similarly, because 1988 is evenly divisible by 4 but not by 100, it was also a leap year. Using this information, write a C++ program that accepts the year as user input, determines whether the year is a leap year, and displays a message telling the user whether the entered year is or is not a leap year.
- (Electrical eng.) a. The voltage gain of an amplifier is given by this formula: voltagegain=[275 23 2 +0.5 f 2 ]n f is the frequency in Hz. n is the number of stages in the amplifier. Using this formula, write, compile, and run a C++ program to determine the value of the voltage gain for a four-stage amplifier operating at a frequency of 120 Hz. Your program should produce the following display: At a frequency of xxxxx hertz, the voltage gain is yyyyy Your program should replace xxxxx with the frequency and yyyyy with the voltage gain. b. Manually check the value your program produces. After verifying that your program is working correctly, modify it to determine the voltage gain of a 12-stage amplifier operating at a frequency of 9500 Hz.Numerical analysis) Given a number, n, and an approximation for its square root, a closer approximation of the actual square root can be found by using this formula: newapproximation=(n/previousapproximation)+previousapproximation2 Using this information, write a C++ program that prompts the user for a number and an initial guess at its square root. Using this input data, your program should calculate an approximation of the square root that’s accurate to 0.00001. (Hint: Stop the loop when the difference between the two approximations is less than 0.00001.)In C++, write a program that converts a temperature from degrees Fahrenheit to degrees Celsius. The formula for converting the temperature from Fahrenheit to Celsius is: celsius = (5/9) (fahrenheit - 32). The program should prompt the user to enter a temperature in Fahrenheit as an integer. It will output the temperature in both Fahrenheit and Celsius. Round decimal values to 4 decimal places.
- PLEASE USE THE SWITCH-CASE STATEMENT FOR THIS PROBLEM The Kingdom of Aleria uses gold coins and other metals for their money and their exchange rate is as follows: 50 copper = 10 nickel 30 nickel = 18 silver 15 silver = 1 gold Based on their exchange rate, create a C program that would accept a number of gold coins ad the user's choice of unit output (S- silver, N-Nickel, C- Copper). The program will then display the equivalent number of coins.1. In order to discourage excess electric consumption, an electrical company charges its customers a lower rate of P7.5 for each of the first 250 kilowatt-hours and a higher rate of P8.5 for each additional kilowatt-hour. In addition, a 10% surtax is added to the final bill. Make a flowchart and write a C program that calculates the electrical bill given the number of kilowatt-hours consumed as input. In the end, print the number of kilowatt-hours consumed and the computed bill. *Use If..else for problem 1*Print your name, course, and year together with the output 2. Write a program that will calculate and print out bills for the city water company. The water rates vary depending on whether the water is for home use, commercial use, or industrial use. A code of H means home use, a code of C means commercial use and a code of I means industrial use. The water rates are computed as follows: code H: P250.00 plus P0.002 per gallon used code C: P5,000.00 for the first 4 million gallons…Q1) How to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below : Age Range Rate ( per hour) (RM)0-20 1.0021-50 3.50Above 50 2.00 In your program, you have to make use of THREE(3) different defined constants for the value of rate per hour and declare the necessary variables.