sor works to read the pollution value in four industrial sites every four hours a day, so you want to write a program in C + + language that reads the pollution values in those sites and finds the rate of pollution in each site and the highest pollution rate?
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: 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: Q1/A chemical sensor works to read the value of pollution in four industrial sites every four hours…
A: Required: Code to get the pollution reading every day in every 4 hours. and find the pollution rate…
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: Write a program that prompts the user to enter the number of students and each student’s name and…
A: Given :- Write a program that prompts the user to enter the number of students and each student’s…
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: Write a C++ program for an automobile workshop to check a vehicle’s engine condition. The program…
A: C++ is a powerful general-purpose programming language and computer programming language which can…
Q: In a project, it is required to define cubes whose compressive strength limits are (20-30 MPa).…
A: Input : Array of values of compressive strength of size of 10 Output : Count of values in range…
Q: Create a C Language program that will use a USER DEFINED FUNCTION, that will perform and display the…
A: Find Your Code Below
Q: Q1: write a complete program in c++ Language to calculate the volume of cylinder according to this…
A: Below find the solution #include <iostream>using namespace std; int main() { int…
Q: Write a program (in C++) which acts as a four-function calculator (addition, subtraction,…
A: #include <iostream>using namespace std; int main(){ int ch; float n1, n2, res;…
Q: In C programming language, if the first and the second operands of operator + are of types int and…
A: Question Given:- In C programming language, if the first and the second operands of operator + are…
Q: You have to create a program in C language in which the user enters the mass m and radius & of a…
A: Moment of inertia of a disk about its axis perpendicular to the plane - MR^2/2 M=mass R=Radius
Q: WRITE A PROGRAM IN C++ TO CALCULATE THE AGE OF THE USER AFTER THE USER ENTERS HIS OR HER YEAR OF…
A: The below points will be used for writing the program to calculate the age of the user: Include…
Q: I always get an error on this code while it works on C language
A: Q: Fix the error in the given program
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: 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: You have to create a program in C language in which the user enters the mass M and radius R of a…
A: Given To know about the moment of inertia in C language program
Q: In C++ Read and understand the following problem: 1. Write a program that accepts from the user a…
A: Here we need to accept quantity and price of that product.
Q: Q1: Write a program in C++ language to find the size of these modifiers? long integer - character-…
A: Code #include <iostream> using namespace std; int main() { int longintegerType;…
Q: Employees in a company receives net salary after the deductions for tax, Staff Provident Fund (SPF),…
A: Given table and asked to find the netsalary when basic salary is given: Table is given with…
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: You have to create a program in C language in which the user enters the mass mand radius R of a…
A: Introduction: A physical quantity that quantifies a body's resistance to having its speed of…
Q: You have to create a program in C language in which the user enters the mass m and radius R of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Project 6: You have to create a program in C language in which the user enters the mass m and radius…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Write a program in C++ to calculate and print the Electricity bill of a given customer. The customer…
A: The given problem is to be used in C++ programming language where the user will be prompted to…
Q: Please write a program to find the greatest common divisor of three number.
A: Please find the answer below
Q: Illustrate your knowledge of C-Programming by implementing a ‘Game of Dice’. User will start with 3…
A: The program is written in C programming language using structured approach. The program uses…
Q: the sample input is: And the sample output is ; 3 6 9 3…
A: Please find the answer below :
Q: Write a program in C that calculates the voltage value (V) of the voltage source using a Function.…
A: #include<stdio.h> float findVoltage(float R,int I){ float voltage; voltage=I*R;//voltage =…
Q: Q4:- write a program in c++ language to read the height of cylinder then calculate the volume and…
A: Here is the solution:-
Q: Write a program in c that uses at least 7 functions of string.
A: The string is an array of characters also called a one-dimensional array. The character array or…
Q: Write a program in C that will convert decimal number enter by the user to its equivalent binary…
A: c++ code to convert decimal to binary
Q: Write a C++ program that computes and display the final grade of the student based on the three…
A: #include<iostream> using namespace std; int main(){ int percentage; cin >>…
Q: Write a program in C ++ language to calculate the value of y, where: y=((6x)^n!) using function by…
A: According to your Question below the Complete Program: Program Output:
Q: write a program in C++ that contains two functions: one for the multiplication operator and the…
A: Step-1: Start Step-2: Declare and input two float variable a and b Step-3: Call function…
Q: Write a C++ program that swaps two values by passing pointers as arguments to function
A: To get the address of a variable we use & operator and this will be the pointer To get the value…
Q: write a c program to validate operators(all operators such as assignment operators , misc operators…
A: The below program validate some of the assignment operators, and some of the misc operators.…
Q: I would like to write a code in the C programming language that specifies how many times the numbers…
A: While doing programming in any programming language, you need to use various variables to store…
Q: What should be the output of below program in C++ LANGUAGE? # include void main O { int a = 1;…
A: here we initialized a=1 so in switch it searches for the case with value 1 it found in the first…
Q: Illustrate your knowledge of C-Programming by implementing a ‘Game of Dice’. User will start with 3…
A: EXPLANATION: - The do...while loop is used to simulate the Dice simulation as per user choice to…
Q: HW8: Write a program in C language by using switch statement for the gear system in automatic cars,…
A: Start Input letter Print System Stop
Q: Write a program in C++ that converts square meter into ping. The program prompts the user to enter a…
A: Below is the required C++ program: - Approach: - Including the header file “iostream” and using the…
Q: Write a program in c++ that declares the average testscore and total test score.
A: Algorithm: Start Open testscore.txt file Initialize count to 0 and sum to 0 and i=0 Read each line…
Q: Write a C++ program that asks a user to type 1, 2, 3, or 4. When the user types 4, the program ends.…
A: I have given an answer in step 2.
Q: You have to create a program in C language in which the user enters the mass M and length L of a…
A: To Do: A rod's moment of inertia around an axis passing through its centre and perpendicular to it…
Q: You have to create a program in C language in which the user enters the mass m and radius of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: An electricity board charges the following rates to domestic users:- Units consumed Tariff For the…
A:
Q: Write a C++ Program to calculate Volume of Cube using constructor and destructor.
A: Given: Write a C++ Program to calculate Volume of Cube using constructor and destructor.
Step by step
Solved in 4 steps with 2 images
- on a C++ program and using loops code this problem, The game of "23" is a two-player game that begins with a pile of 23 toothpicks. Players take turns, withdrawing either 1, 2 or 3 toothpicks at a time. The player to withdraw the last toothpick loses the game. Write a human vs. computer program that plays "23". The human should always move first. When it is the computer's turn it should play according to the following rules: If there are more than 7 toothpicks left, then the computer should withdraw a random number of toothpicks (from 1 to 3). Use the rand() function, as demonstrated in class to produce this number.. If there are 2, 3 or 4 toothpicks left, then the computer should withdraw enough toothpicks to leave 1. If there is 1 toothpick left, then the computer has to take it and loses. When the human player enters the number of toothpicks to withdraw, the program should perform input validation. Make sure that the entered number is between 1 and 3 (inclusive) and that…A valid email address consists of an email prefix and an email domain, both in acceptable formats. The prefix appears to the left of the @ symbol. The domain appears to the right of the @ symbol. For example, eng221t@mail.com, "eng2217" is the email prefix, and "mail.com" is the email domain Write a C++ program, which reads the email addresses from the file (input.txt) and find out whether it is a valid email address or not based on the following rules. 1. The email address must start with a letter (a-z or A-Z) (no numbers or symbols). 2. There must be an @ somewhere in the string that is located before the dot. 3. There must be text after the @ symbol but before the dot. 4. There must be a dot and text after the dot e.g.( ali@gmail.com). For each valid email address, the program should find its Prefix and Domain. You must have to use only one user defined function that has the following prototype. bool checkValid(string email); In this function definition you have to check whether the…Please code in C++. Write a program that simulates a coin-tossing game. At the beginning of the game, each of N players has a single fair coin and M points. The game performs a sequence of passes until only a minimum number of players remain. In a pass the players toss their coins into the air and when the coins fall to earth, the players count the number of coins that show heads and the number of coins that show tails. If the number of heads exceed the number of tails, then the players who tossed heads increase their points by an integer P and the players who tossed tails decrease their points by the same integer P. The players perform the opposite actions when the number of tails is greater than the number of heads. If the number of heads equals the number of tails, then no player’s points change. If any player’s points fall below one, then the player leaves the game, never to return. The game employs a second integer K to compute P’s value. K’s and P’s initial values are one.…
- Write a C++ program that computes the equivalent resistance of a purely series and purely parallel electric circuit using CLASSES AND OBJECT (OOP)! ADDITIONAL INFORMATION:• The program will ask the user to choose whether to compute for the equivalent resistance of a series or parallel combination.• The user will input three resistance values R1, R2, and R3 in ohms.• The program will provide an output of equivalent resistance in series (RS) or parallel (RP).Please answer this in c++ asap A very successful cinema director named "Chef" decided to solve the problem. When a customer wants to buy a ticket, the clerk at the ticket window asks the visitor if he or she needs a rest area, and if so, which one: left, right, or both. We know that in the audience they are expected to appear, their L needs a left-handed position, their R needs a right one, Z does not need a single one and B needs both. Your job is to count the number of people who can attend the show. In the theatre there are N rows with each M seat. There is only one lounge between the two adjacent seats. Seats at the beginning and end of the row have two armrests Input 1 223211 Output: 4Write a C++ program that computes the equivalent resistance of a purely series and purely parallel electric circuit using CLASSES AND OBJECT (OOP). NOTES TO FOLLOW:• The program will ask the user to choose whether to compute for the equivalent resistance of a series or parallel combination. • The user will input three resistance values R1, R2, and R3 in ohms. • The program will provide an output of equivalent resistance in series (RS) or parallel (RP).
- i want the solution in C++ language solution should setup the midnight time to 0, and then write out all the possibilities that can take place in finding the difference between hours and minutes 4.7: Time Machine Your time machine is capable of going forward in time up to 24 hours. The machine is configured to jump ahead in minutes. To enter the proper number of minutes into your machine, you would like a program that can take a start time (in hours, minutes, and a Boolean indicating AM or PM) and a future time (in hours, minutes, and a Boolean indicating AM or PM) and calculate the difference in minutes between the start and future time. A time is specified in your program with three variables: int hours, minutes; bool isAM; // You can also use a char, i.e. A or P for example, to represent 11:50 PM, you would store: hours = 11,minutes = 50, isAM = false or if using a char, hours = 11,minutes = 50, isAM = 'A' This means that you need six variables to store a start and future time.…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…Need Help solving this in C++ language . Prompt for and get the user’s number of donuts to buy and the number of people who will be attending ameeting. Then print the information as shown below: Number of donuts = 23Number of people = 6Each person gets 3 donutsThere will be 5 donuts left
- A person tries to finish a 10000 piece puzzle and wants to know how much time will it take to finish it in total. This person keeps track of how much s/he spent on the puzzle in each session, in hours and minutes. In order to calculate the total time, s/he has to build a complete C++ program. In 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 Write the definition for a class called Time that has hours and minutes as integer. The class has also the following member functions: • 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 4 3 30 4 45 1 15 2 25 How many times did you try to do the puzzle: 4 Enter a time, (hour min): 3 30 Time 1 : 3 hours and 30 minutes Enter a time, (hour min): 4 45 Time 2 : 4 hours and 45 minutes Enter a time, (hour min): 1 15 Time 3 : 1 hours…The Goal of this project is to write a program in C++that calculates car rental amounts (for an online 24/24 service).The rental rates are as follows: •From 00:00 am to 06:59 am and from 17:00pm to 24:00pm: 8 dollar/hour •From 07:00 am to 16:59 pm: 10 dollars/hour The program will ask the user to enter the start and end hours of the rental as integers and will compute and display the rental cost. You will adopt the following simplifications: •the hours are integers (we don’t mind about minutes; each started hour will be fully paid); •the start time (i.e., hour) of the rental period must always be less than the end time (i.e., hour) of the rent. This means that one cannot hire a car for more than 24 hours and that each rental period must lie within the same day.Write a C/C++ program that asks the user for threeinteger marks. These are the student marks out of25 for class tests.Subsequently the program should ask the user fora big test mark out of 50. The final mark iscalculated with 50% class tests and 50% test mark.Test all values for validity. If a value is invalid, amessage should be displayed, and the user shouldbe repeatedly given chance to correct the input.The program should display the final mark, as wellas the symbol of the student (see Table 1.2).The program should repeat until the user enters“-1” for the first class test.After the user has entered “-1”, the program shoulddisplay a summary of the marks, i.e. the averagefinal mark, highest final mark, and lowest finalmark. The program also displays the number ofstudents that pass (mark>=50), pass withdistinction (mark>=75), and the number of studentsthat fail (mark<50).See Figure 1.2 for example output