Q4:- write a program in c++ language to read the height of cylinder then calculate the volume and the side area of cylinder in the case that the height of all cylinders is greater than or equal to 7 cm according to these rules: i. Volume = height the base area ii. Side area = height the base perimeter Suppose the number of cylinders is 500
Q: Write a C program to calculate Gross Salary of an employee. Here’s simple program to calculate Gross…
A: HI THEREI AM ADDING C CODE AS PER ABOVE REQUIREMENT BELOWPLEASE GO THROUGH IT THANK YOU
Q: Q1:- From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then…
A: Program code: // include the required header files #include<iostream> using namespace std; //…
Q: Question Write a program in C ++ to read an integer number that expresses the age, so that the…
A: As much as I could understand the question, the grading system seems to be like this: Age Grade…
Q: HW1: Write a program in C language by using if statement regarding the car seat belt, based on the…
A: Please find the answer below :
Q: 7. Write a C++ program that calculates and prints the bill for a car rental company. The company…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; //function to…
Q: Q3. A water distribution company charges its consumers depending the type of customer: R-…
A: Program approach: Declare all essential variables. Use do while loop for repetition. Input a…
Q: Write a program in C++ to print all those natural numbers whose cube is less than or equal to 1000
A: Run a loop from i=1 and then check if the the cube of i is greater than 1000 or not. If cube is less…
Q: Q1:- From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then…
A: #include <iostream> using namespace std; int main(){ float height, radius, volume, sideArea,…
Q: HW5: Write a program in C language by using if statement for the gear system in automatic cars,…
A: Step 1:- Program Approach:- 1.Include the header file 2.Declare the variable of a data type…
Q: In c++, create a program that gets quarterly sales from a user and calculates the total of all four…
A: Introduction: Here we are required to display the total, average, highest and lowest quarter sales…
Q: Q5\| Write a program in C++ language to read the value of angles in degrees and calculates the value…
A: The code is given in the below step
Q: Q.3 Write a C++ program that calculates the volume of a solid cone. The formula is: volume = ((0…
A: Formula of volume of sphere: (πr2h)/3 Below is the required code in C++. Program Approach: Include…
Q: Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program in C…
A: Step-1: Start Step-2: Declare variables fahren, cel Step-3: Take input from user and store in cel…
Q: Write a C++ program. A software company sells a package that retails for $109. Quantity discounts…
A: To write a C++ program using the if/else if/else statement that asks for the number of units sold…
Q: Project 3: You have to create a program in C language in which the user enters the mass M an radius…
A: I give the code in C along with the output screenshot and code screenshot.
Q: Q3/1/ Write a program in C++language, to read three numbers and then after the number with the…
A: PROGRAM INTRODUCTION: Include the required header files. Start the definition of the function in…
Q: Q3 Write a C++ program to find the sea wave speed (c) for the rang of water depths {0,5,10,15,20…
A: Algorithm: Start Set PI=3.14 Set g=9.81 Read L Read d Compute: k = L/(2*PI) IF (d/L)<0.05: c…
Q: Write a code snippet in C that can arrange the alphabets of a name entered by user in alternate…
A: Program code: //include the required header files#include <stdio.h>#include…
Q: Project 6: You have to create a program in C language in which the user enters the mass m and radius…
A: Moment Of Inertia for a Circular Disc: The tendency of a body to resist change or moment of inertia…
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: In C programming language, write a program to input the radius of a sphere and display the…
A: In the C programming language, write a program to input the radius of a sphere and display the…
Q: Complete the function given below in C language without using the pow() function, int pow5(int); The…
A: Solution :
Q: Q4) Write a program in C++ language to obtain the equation below, for value of i (1 to N), by using…
A: // C++ program to perform operation on numbers from 1 to N #include…
Q: Write a C++ program that asks the user for the length and width of a rectangle then calculate its…
A: create a main() and then initialize the variables w for width, l for length, and then area_rect to…
Q: in C++ : Write a program that PRINTS all numbers between 1 and 100 that are divisible by both 5…
A: We are going to write a C++ code where we will pick range from 1 to 100 and we will print only those…
Q: nstructions Write a short C program that reads an integer from the user then prints the double value…
A: Write a program in C that read integer value from user then prints double value of number on screen
Q: 2. Write a C program that displays the number of months, weeks and days in a given number of days.…
A: Given, A month contains 30 days and a week contains 7 days. days is a user input integer…
Q: 7. Write a C++ program that calculates and prints the bill for a car rental company. The company…
A: Code: #include <iostream> using namespace std; int main() { // Declaring arrays with…
Q: C Programming Write a program that reads an integer from the user (keyboard), namely n. Your…
A: As per the given problem statement we are required to develop a C code which take an input of…
Q: Project 6: You have to create a program in C language in which the user enters the mass M and radius…
A: C language: C is an imperative procedural language with a static type system that supports…
Q: Q3\ Write a C+ program that takes the number of the month as an input then shows the name of the…
A: According to the question below the program:
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: base From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then…
A: Program to require input of the size of a cylinder. Calculate the expanse of the cylinder.…
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: Q2: Write a program in C++ language to evaluate this equation below? y = x? +-5
A: C++ program to evaluate the equation as given
Q: Q1:- From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then…
A: Introduction of Program: The C++ program provided with the height of cylinder as input value, and…
Q: 3- Write a program in C++, to read a number and calculate the average of the digits it consists of,…
A: The program is written in C++ Please find the program in the following step.
Q: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all…
A: #include <iostream>#include <fstream>#include <cmath>#include <iomanip>using…
Q: Q1) Write a C++ program which determines the weather according to the temperature as follow:…
A: #include <iostream>using namespace std;int main(){ int t; cout<<"Enter the…
Q: Project 6: You have to create a program in C language in which the user enters the mass m and radius…
A: The question has been answered in step2
Q: 01:- From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then…
A: PROGRAM STRUCTURE: Include the required header files. Start the definition of the main function.…
Q: 5- Write a C program that reads a number and check whether its' prime or not. Note: a prime number…
A: Write a C program that reads a number and check whether it's prime or not. A prime number is that…
Q: Write a program in C++ to display n odd numbers and find: 1- The sum of numbers and average. 2- The…
A: Write a program in C++ to display n odd numbers and find: 1- The sum of numbers and average. 2- The…
Q: Find the attached file.
A: Program Approach: Create variables and take input from user. Store entered values in an array. Ask…
Q: An electricity board charges the following rates to domestic users:- Units consumed Tariff For the…
A:
Step by step
Solved in 2 steps with 1 images
- An electricity board charges the following rates to domestic users:-Units consumed TariffFor the first 100 units Rs. 5 per unitFor the next 200 units Rs.10 per unitFor the next 300 units Rs.15 per unitWrite a C++ program using class to read the names of users and number of units consumed andprint out the charges (in Rs.) with names. Write in CPP languageIn 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…C++ Programming: Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output the average calories burned for a person. Output each floating-point value with two digits after the decimal point, which can be achieved by executingcout << fixed << setprecision(2); once before all other cout statements.
- Use C++ programming language A customer in a store is purchasing five items. The prices of the five items are:Price of item 1 = $15.95Price of item 2 = $24.95Price of item 3 = $6.95Price of item 4 = $12.95Price of item 5 = $3.95Write a program that holds the prices of the five items in five variables. Display each item’sprice, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is7%.In C++, Write a program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum, product, difference, and quotient of the two numbers.Write a C++ Program to find Factorial of a number using class. int main() is provided, all you have to do is to create the class. #include <iostream>using namespace std; int main(){ factorial f; f.input(); f.calc(); f.display(); return 0;}
- a. Write a c program that asks a user for an integer. Declare a variable num3. Let num3 = --x; Display the values of x, and num3.b. Write a c program that asks a user for an integer. Declare a variable num4. Let num4 = x--; Display the values of x, and num4.In c++, create a program that gets quarterly sales from a user and calculates the total of all four quarters as well as the average, lowest, and highest quarters. Console Example The Quarterly Sales program Enter sales for Q1: 12312.57 Enter sales for Q2: 15293.21 Enter sales for Q3: 14920.95 Enter sales for Q4: 23432.21 Total: 65958.94 Average Quarter: 16489.74 Lowest Quarter: 12312.57 Highest Quarter: 23432.21 Specifications to complete program Create the pseudocode needed to implement the solution above. Convert your pseudocode to C++ code including the following specifications: Round the average quarter to a maximum of 2 decimal digits. Use a vector to store the sales for each quarter. Use STL algorithms to process the data for the quarters.Q13/ Write a program in c++ that asks the user to input two numbers. If the first number entered is greater than the second number, the program should print the message: "The first number is greater." Otherwise, it should print the message: "The first number is smaller." .By using functions
- Could you please write a program in C++ according to the instructions and criteria that reads a sentence as input and converts each word to "Pig Latin." In one version, to convert a word to Pig Latin, your remove the first letter and place the letter at the end of the word. Then you append the string "ay" to the word. Here is an example: English: I SLEPT MOST OF THE NIGHT Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY Criteria 1) program compiles2) program solves problem according to specification3) program declares, creates, or initializes static or dynamic array correctly4) if required program defines function or functions with array parameters or array returns5) program uses arrays to solve problem6) program destroys any dynamic arrays Thank you.Write a code snippet in C that can arrange the alphabets of a name entered by user in alternate cases.Note: Ignore white spaces. Input String:Timothy Olyphant Output String :TiMoThY OLyPhAnT Input String: Olga Kurylenko Output string: OlGa KuRyLeNkOC++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.