1. Write a C++ program which take number of consumed units as input and calculate the electricity bill using following table and apply a GST at the rate of 16% to the final amount: Price Rs.5 101-150 Rs.8 150-200 Rs.10 Units 1-100 >200 Rs.12
Q: A computer company pays its employees salaries based on amount of monthly sales made by each…
A: In questions with many questions, we must solve the first one.
Q: Q #2: Write a program in C to check a given number is even or odd.Using the function with no…
A: C CODE:- #include <stdio.h>#include <stdbool.h>bool checkNumber(int num); int main(){…
Q: Question 1: Write a C++ program to read a number from the user and print whether it is zero,…
A: #include <iostream> using namespace std; int main(){ int num; //to initilize an…
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: 1. Write a C++ program which take number of consumed units as input and calculate the electricity…
A: Define header file <iostream> for i/o operations. Define main() function. Define variables…
Q: Exercise 2: Write a C program that uses standard functions to four numbers from the user and find:…
A: As per the requirement program is developed. Algorithm: Step 1: Include the required header file…
Q: Write a C program that calculates the price of a pizza and prints the receipt as follows: 1- Your…
A: Program approach: Create the main function. Declared all variables. Display program heading. Input…
Q: Write a C++ program that accepts the rectangular coordinates of two points (x1,y1) and (x2,y2),…
A: In this program, we need to read coordinates of two points assume (x1, y1) and (x2, y2) then…
Q: Write a program in C to calculate and print the Electricity bill of a given customer. The customer…
A: #include<iostream>using namespace std;int main(){ int customer_id, units; string name;…
Q: Q #2: Write a program in C to check a given number is even or odd 1. Using the function with no…
A: C CODE:- #include <stdio.h>#include <stdbool.h>bool checkNumber(int num); int main(){…
Q: Write a program in C to show the simple structure of a function. Expected Output : The total is :…
A: Given: Write a program in C to show the simple structure of a function.Expected Output : The total…
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 complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of…
A: To find sum of two numbers in C++, we will first take two numbers as input from user using cin…
Q: Use c++ Write a program whose inputs are three integers, and whose outputs are the largest of the…
A: C++ Code for smallest and largest among three numbers: #include <iostream> using namespace…
Q: Q3: Write a C++ program, using function, which reads an integer value (T) representing time in…
A: Code is below for the given problem:
Q: 2. Write a C program to find the eligibility of admission for a professional course based on the…
A: C Program for above : #include <stdio.h> #include <stdbool.h> int main() { //get…
Q: Suppose you designed a TAXI FARE SYSTEM and you want to evaluate the fare in according to the…
A: Start input distance according to condition calculate fare display total fare stop
Q: Write a program in C++ to calculate and print the Electricity bill of a given customer. The customer…
A: EXPLANATION: Include the necessary header files. Create a function that will take the user input…
Q: Write a C ++ program which take number of consumed unit as input and calculator the electricity bill…
A: Sample Response: //C++ program to calculate the electricity bill#include<iostream>using…
Q: Question 3) Write a C program to take input two integers x,y from the user and compute the value of…
A: Write a C program to take input two integers x,y from the user and compute the value of t1 and t2…
Q: 2. Write a C program to find the eligibility of admission for a professional course based on the…
A: Code screenshot:
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: C program to calculate and print electricity bill of customer. program code is in step 2. and…
Q: Question 3: Write a C++ program to compute the following: N = n * (n-10) * (n-20) * (n-30)... * 1/M,…
A: Need to write program in C++ to calculate : N = n*(n-10)*(n-20)*(n-30) ... * 1 / M, where n and M…
Q: 1. Write a complete C++ program to prompt a user to enter the working hours and rate per hour.…
A: Given Total_salary=working hours* rate per hours To write c++ program to calculate total salary
Q: a) Write a C++ program that inputs a three digits number from the user and display it in reverse…
A: Here is your C++ code with an output.
Q: Q2) Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)?…
A: Algorithm: Start Input a, b, x, y Calculate w Print w Stop
Q: 3) Write a C++ program to implement the following expression: 3x? + sin(x² 7w- Y = elel – 8 Where…
A: #include <math.h>#include <iostream> using namespace std; int main(){ float…
Q: Q2) Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)?…
A: Code: #include <iostream>using namespace std;#include <cmath>int main(){ //declaring…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: #include <stdio.h> int main() { // variable declarations int customer_id, unit_consumed;…
Q: Please write a C++ program that will accept 3 integer numbers from the user, and then output these 3…
A:
Q: Write a program in C++ with total change amount as an integer input, and output the change using the…
A: The program is written in step 2
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: 3. Write a complete C program for a restaurant that takes the net profit of each day for 4 weeks…
A: Using procedural approach. Using two dimensional array to store daily salary.
Q: Write a C++ program which take numbe consumed units as input and calculate electricity bill using…
A: Include header files. Declare a main method. Declare variables (units, EC(as Electric Charges), GST)…
Q: Write a C++ program to overload area() function to calculate area of shapes like triangle,square,…
A: Define header file <iostream> for i/o operations. Declare a function area() with one integer…
Q: Write a C++ program to automate the Grocery shop bill for 6 items. The program asks the grocery shop…
A: In the c++ program, add the necessary libraries in the program. To help the program to run without…
Q: Write a program in C++ to calculate and print the Electricity bill of a given customer. The customer…
A: The below given C++ program will obey the following rubrics: Including necessary header files. In…
Q: Question 4) Write a C program to take input two integers x,y from the user and compute the value of…
A: Write a C program to take input two integers x,y from the user and compute the value of t1 and t2…
Q: Write a C++ program that requests the user to enter a letter or a digit. Use if-statements and the…
A: The program will take the input character and stores into a variable. It uses IF ELSE condition to…
Q: 1- write a c program to process weekly employee time cards for all employees of an organization…
A: As per the guidelines we are supposed to answer only one question. Kindly repost other questions as…
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: Q2 Write an interactive C program using if - else statement, to input water unit charge and…
A: The given problem is related to programing that needs to be solved in C language where the user will…
Q: Question 5 Write a Fortran program that reads user's input of a real value, then calculate the…
A: beginning of the code program gaussian REAL x ! define variable…
Q: In c++, write a unit conversion program that asks which unit to convert from and which unit to…
A: #include<bits/stdc++.h>using namespace std;int main() { float mag; cout<<"Enter the…
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: 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: : Write a program in C to check a given number is even or odd.Using the function with no arguments…
A: Given: Q #2: Write a program in C to check a given number is even or odd.Using the function with no…
Q: 2. Write a complete C program that reads two numbers and an arithmetic operator (+, -, *, /) then…
A: Below is the required C program: - Program Approach: -• Including necessary header file• Function…
Q: Write a C++ program that prompts the user to enter two integer numbers and the program should print…
A: The [program is implemented in C++ with procedural approach. Following is the program algorithm Ask…
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: Write a C++ program that prompts the user to enter two integer numbers and the program should print…
A: According to the Question below the program: Program Output:
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: Write a complete C++ program consisting of the main function and a void function. The program uses…
A: In C++, we have sqrt() method to find the square root of the number. we have log() method to find…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: In this user has to enter customer id Name and unit consumed then according to unit find the rm…
Q: b) Write a complete C- Program for Electricity Bill Computation. Program will use two user defined…
A: The objective of the given problem is to compute the electricity bill for the given number of units…
Q: Q2) Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)2…
A: I have provided default values of a, b, x and y as an example to find the value of W using the given…
Q: Write a C program that deletes the desired character in a text entered by the user on the keyboard.…
A: strlen(): This function is used to determine the length of a string.gets() : The C gets() feature…
Q: are as follow: Unit Charge/unit upto 199 @1.20 200 and above but less than 400 @1.45 400…
A: EXPLANATION Read the input using readline(); Use if-else if statement to implement all the…
Step by step
Solved in 3 steps with 2 images
- Q 4) Write a c# program to calculate and print the bill of a given customer. [2] The customer id., name and unit consumed by the user should be taken from the keyboard and display the total amount to pay to the customer. The charges are as follow: Unit Charge/unit upto 199 @1.20 200 and above but less than 400 @1.45 400 and above but less than 600 @1.70 600 and above @2.50 If bill exceeds Rs. 400 then a surcharge of 16% will be charged and the minimum bill should be of Rs. 150/=Write program in C; compatible with quincy please Write a program that calculates the area (a) of a triangle given two values b (base) and h (height) and using the formula area = (base * height) / 2 .The program should include a function called calculate_area which has two input parameters(b and h) and one output parameter (a).The user is prompted to enter two input values that will be used as base (b) and height (h) thenthe function calculate_area uses those two values as input parameters returns the calculatedarea (a) as an output parameter. After using the function calculate_area the program shoulddisplay the calculated area (a).Hint: use a pointer for the output parameterWrite a program, USING C, to read and display the information employees in a group. Then edit the details of the employee and redisplay the entire information. Here is the list of 3 employees in a group: Employee ID Employee name Experience Salary Department 5561 Richard 1 68000 Product Development 5562 Callum 2 100000 Product Development 5563 Elon 4 150000 Product Development Your Code should generate the following output for each of the employees. Example: ********DETAILS OF Employee 1******* Employee ID = 5561 Employee Name = Richard Salary = 68000 Experience = 1 Department = Product Development Richard started learning Data Structure well and applied for a different position in the same company. He was chosen for the new role under a different department. As a result, his salary raised to 200000 and his new Department is Data Science. Modify the details of Richard and…
- Write a c++ program that contains a “main” and 4 functions: In the main function declare 4 integer variables x, y, z and m and call the following functions: The first function is to initialize the 4 variables using the last 4 digits of your university ID number. For example, if your ID number is 43956789 then you x=6, y=7, z=8, and m =9. The second function should calculate and print the average of the 4 variables. The third function is to find the largest number of the 3 variables. The last function should double the values of the 4 variables. For example if x = 6 then x will become 12.Use c++ Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the three values. Ex: If the input is: 7 15 3 the output is: largest: 15 smallest: 3 Your program must define and call the following two functions. The LargestNumber function should return the largest number of the three input values. The SmallestNumber function should return the smallest number of the three input values.int LargestNumber(int num1, int num2, int num3)int SmallestNumber(int num1, int num2, int num3)You have to write a program in C++ that Mr. Ali has invested an amount of Rs101, 876 in a Bank scheme. Bank credits profit of 7% each year, and charge a bank fee of Rs 100 per month. What will be you amount at the end of 7th year?
- Write a program in C++ to calculate and print the Electricity bill of a given customer. The customer id, name, and unit consumed by the user should be taken from the keyboard and display the total amount to pay to the customer. The charging cost are as follows Unit Charge/unit @120 1.50 upto 199 200 and above but less than 400 @1.80 02:00 400 and above but less than 600 600 and aboveWrite a C program that will calculate the total payment for a brand new car being purchased on installment. The user will input the car price, amount of downpayment made (for 0% to 80% of the car price), interest rate per annum (from 5% to 20%, can be fractional up to 2 decimal places), and the number of months of amortization (12, 24, 36, 48 or 60). Show a summary of the details inputted by the user together with the amount to be financed and the monthly amortization cost. Dispaly a running tally per month of the number of months paid, the total amortization paid (in pesos), and the total running cost of the car. Please provide comments if possible so that i could follow your code easily :)In C++ using endl; 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 status If the marital status is “married,” ask for the number of children under the age of 14 Gross 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…
- 1) Write a c++ program that calculates the cost of 3 bags of fruit. The 4 possible fruits arepears which cost 1 dollar each, pomegranites which cost 2 dollars each, plumbs whichcost 3 dollars each, and bananas which cost 5 dollars each. Each bag can contain anynumber of different fruits with any quantity of each particular fruit. The program willprompt the user to enter a particular fruit by typing the name of the fruit: .‘pear’ forpears, ‘pomegranite” for pomegranites, ‘plumb’ for plumbs, and ‘banana” for bananas,and then prompt for the quantity of that fruit that will be placed in the bag. The programwill then continue to prompt the user in the same manner for more fruit to be placed inthe same bag until the user types the word ‘done’. This will then cause the program tohave the user enter the various quantities of fruit for the next bag. When the user hasentered the varieties of fruit in all 3 bags, the program will display the total cost of fruitper bag and the overall cost for all…2. Write a program that accepts the price of a meal and the tip percent as a whole number. The program is to compute the tip amount in a separate sub-function, then compute the total amount owed, and finally print out the three amounts in a separate sub-function FORMATTED AS BELOW. Total of sale is: 9999.99 Total tip amount is: 9999.99 Total amount due is: 9999.99Use C++ Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies. Ex: If the input is: 0 or less, the output is: no change Ex: If the input is: 45 the output is: 1 quarter 2 dimes Your program must define and call the following function. Positions 0-4 of coinVals should contain the number of dollars, quarters, dimes, nickels, and pennies, respectively.void ExactChange(int userTotal, vector<int>& coinVals)