Kathryn bought 750 shares of stock for $35.00 per share. A year later she sold them for just $31.15 per share. Write a program in C++ that calculates and displays the following The total amount paid for the stock The total amount received from selling the stock The total amount of money she lost
Q: 5. Write a C language program which will take a real number and a character from the keyboard. The…
A: #include <stdio.h> int main(){ float real, km, mile; /* Declaration of Real value as real,…
Q: artin wants to create a program in c++ that requires the user to input 10 integers then print the…
A: Required C++ code provided 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: language program which should display 4 items (keyboard, mouse, monitor and speaker) with their…
A: Note: As not mentioned I have solved the question in Python language Code: name = ["keyboard",…
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: Let the following variable is declared in the C++ program as (int X;). Write one statement that…
A: Include the necessary header files. Declare the integer variable X. Get the input from the user. The…
Q: You’re given coins of different denominations and a total amount of money. From that, you need to…
A: In this problem, we were given the coins of different denominations and a total amount of money is…
Q: When Tony went house after a long time, he saw a mysterious villa. When he came to the entrance, the…
A: Input and output explanation: The first line of the input contains a single integer T denoting the…
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: Write a program in C# that will ask the user to enter two double numbers. Use an if() statement to…
A: Program plan: Ask the user to enter the first number. Ask the user to enter the second number. Use…
Q: Write a program in C++ that displays the following checkerboard pattern. Your program must use only…
A: The answer is...
Q: A chemical sensor works to read the value of pollution in four industrial sites every four hours a…
A: Required: write a program in C ++ language that works to read the pollution values in those sites…
Q: Write a C program that calculates the employee salary and print the information as follows: - Your…
A: As per question the code is given below:
Q: Programing C Create a program that reads a letter grade and outputs a decimal grade. Your program…
A: A C program for the given criteria is as follows, File name: “main.c” #include <stdio.h>…
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 given…
Q: Write a C++ program that displays a table of speeds in kilometers per hour with their values…
A: Given, The formula for converting kilometers per hour to miles per hour:…
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: 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: 1. IntegerCounter by Julian Semblante Write a C program that will accept n integers and display the…
A: PROGRAM INTRODUCTION: Include the required header files. Take the number of integers from the user.…
Q: C++ program called AlphaBravoCharlie which prints the numbers 1 to 110, 11 numbers per line. The…
A: The below given C++ program will obey the following rubrics: Including necessary header files.…
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: In the code editor, you are provided with an initial code that asks the user for an integer input…
A: The base case is when the number is 0 and we don't want to add anything whereas in recursive case…
Q: Write a c program that prints: - Your name - Your e-mail address - Your High School - Home town -…
A: Variable definition: A name given to a memory address to store data values is called a variable.…
Q: What happens if the following program is executed in C and C++? #include void main() {…
A: Given, We have to find what happens if the given program is executed in C and C++. Code:…
Q: What type would you use to hold a person's first name in a C/C++ program? O int float O string O…
A: We would use a string.
Q: Trying to write a C# program, everytime l try and run it it fails and says they are errors.Below…
A:
Q: In C Language please.. 6. DigitMon by CodeChum Admin When I was a kid, I used to play Digimon. Now…
A: The function calculates rhe sum of digits of the number.
Q: Write a program in C++ that prompts the user to enter five test scores
A: Actually. program is a executable software that runs on a computer.
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: 2. Write a C++ program to play a guessing game: • The computer randomly generates a number between 1…
A: // Code #include <iostream>#include <stdlib.h> using namespace std; int main(){ int…
Q: In your C compiler: 1. Given two numbers X and Y. Write a program to determine the difference…
A: #include <stdio.h>int main(){ //1 int X,Y,R; //reading X,Y value from user…
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 for a number guessing game. The program generates and stores a random number and…
A: The problem is based on guessing the number and the solution includes use of rand() and srand()…
Q: Write a C++ program for a number guessing game. The program generates and stores a random number and…
A: Input : Input the guess number until 50 is entered. Output : Keep count of the number of times…
Q: The Kingdom of Aleria uses gold coins and other metals for their money and their exchange rate is as…
A: Algorithm: Start Read no.of gold coins n Ask user's choice of unit output (S- silver, N-Nickel, C-…
Q: the number of days to years, weeks and days. For example: 375 days = 1 year 1 week 3 days. Use the…
A: Here in this question we have asked to write a c program which take no of day from user and convert…
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: A County collects property taxes on the assessment value of the property, which is 60 percent of the…
A: Use a function to get the assessmentValue and propertyTax
Q: Write a C++ program in which you declare variables that will hold an hourly wage, a number of hours…
A: Program Approach: Create variables of type int Take input from user Calculate net pay using formula…
Q: In C++ write a program to perform all mathematical operations on two variables?
A: Code: #include <iostream>using namespace std; int main(){ int num1, num2, ad,sub,mul;…
Q: Write a C++ program for a number guessing game. The program generates and stores a random number and…
A: #include <iostream>#include <cstdlib>#include <ctime>using namespace std; int…
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: 7. Write a C++ program that calculates and prints the bill for a car rental company. The company…
A: #include<iostream>using namespace std;int main(){ char type;…
Q: Find the C program language Deal or No Deal? by CodeChum Admin When I was a kid, I used to watch…
A: As per the requirement program is done. Here you can change the array values as your wish but as per…
Q: An electricity board charges the following rates to domestic users:- Units consumed Tariff For the…
A:
Q: I would like to create a C++ code that creates a table for the user's choice of basic math…
A: Syntax: do { // Loop-body } while ( Condition ) ; Flowchart:
Q: Write a C# program named TestScoreList that accepts eight int values representing student test…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Kathryn bought 750 shares of stock for $35.00 per share. A year later she sold them for just $31.15 per share.
Write a program in C++ that calculates and displays the following
- The total amount paid for the stock
- The total amount received from selling the stock
- The total amount of money she lost
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
- (C PROGRAMMING ONLY) 6. 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: 6132450351503022244Jason Hardy opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium(12 oz), and large (15 oz). The cost of one small cup is $1.75, one medium cup is $1.90, and one largecup is $2.00. Write a menu-driven program in c++ that will make the coffee shop operational. Your programshould allow the user to do the following:a. Buy coffee in any size and in any number of cups.b. At any time show the total number of cups of each size sold.c. At any time show the total amount of coffee sold.d. At any time show the total money made.Your program should consist of at least the following functions:1. a function to show the user how to use the program,2. a function to sell coffee,3. a function to show the number of cups of each size sold,4. a function to show the total amount of coffee sold, and a function to show the totalmoney made.Your program should not use any global variables and special values such as coffee cup sizes and cost of a coffee cup must be declared as…Write a C++ program that displays a table of speeds in kilometers per hour with their values converted to miles per hour. The formula for converting kilometers perhour to miles per hour is: MPH = KPH * 0.6214. In the formula, MPH is the speed in miles per hour and KPH is the speed in kilometers per hour. The table that your program displays should show speeds from 60 kilometers per hour through 130 kilometers per hour, in increments of 10, along with their values converted to miles per hour.
- 2 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.In order for the bulb to work, 3 buttons must be pressed and the button values must provide exactly the required energy, there should be no more or less. It is assumed that the buttons are pressed simultaneously, the order is not important. If the required energy is provided with the entered button values, the program should output "Bulb On", if not, "Bulb Does Not Light" output. Code the program in C language, following the rules below. 1. The number of buttons and their values will be taken from the user.2. The energy required for the bulb to work will be taken from the user.3. You have to design the program RECURSIVE.4. The triple button groups that provide the required energy do not have to be listed, it is sufficient to send a message to the screenTrying to write a C# program, everytime l try and run it it fails and says they are errors.Below screenshot is for the problem Write a program to calculate electricity charges for a customer. The program requests a name, previous meter reading and current meter reading. The difference in the two readings gives the number of units of electricity used. The customer pays a fixed charge of $25. In addition to the fixed charge, 20 cents is charged for each unit used. Print all the data, the number of units used and the amount the customer must pay, appropriately labelled. Additional information: You may assume that the current meter reading is larger than or equat to the previous meter reading. You may assume all data entered into your program is correct
- 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 the amount of tip per person given bill amount after tax. Atax of 16% will be added to the bill.Your program should input the following information:1. The bill2. The percentage of tip that the person wants to pay: (10%, 15%, or 20%)3. The number of personsYour program should output the following information:1. The tax amounts.2. The bill after tax3. tip per person4. Total per personIn this chapter, you learned that although a double and a decimal both hold floating-point numbers, a double can hold a larger value. Write a C# program named DoubleDecimalTest that declares and displays two variables-a double and a decimal. Experiment by assigning the same constant value to each variable so that the assignment to the double is legal but the assignment to the decimal is not. In other words, when you leave the decimal assignment statement in the program, an error message should be generated that indicates the value is outside the range of the type decimal, but when you comment out the decimal assignment and its output statement, the program should compile correctly.
- (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.I am trying to write a code in C++ to output the sum of the square of the odd numbers between 2 user input numbers (firstNum and secondNum). The code below is what I have, but it isnt working. Assignment due at midnight! number = firstNum;sum = 0;do{(number % 2 == 0); sum += (number * number);number++;number++;continue; }while (number <= secondNum);cout << "sum = " << sum << endl;cout << endl;Write a C program that calculates the price of a pizza and prints the receipt as follows: 1- Your program should first ask the user to enter the size of the pizza (integer value 1=large, 2=medium, 3=small) as well as the number of toppings (integer). 2- Your program should then read the pizza basic price (double) as well as the price of a topping ( float ) from the user. 3- Your program should then calculate the total price of the pizza using the following formula: Total price = ( basic price + number of toppings * topping price ) / size; And print a receipt which displays the details of your pizza order as well as the final total price to the screen