A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a single serving equals 300 calories. Design and write a C++ program that prompts your user for the number of cookies that he or she actually ate from one of these bags and then displays the number of calories they consumed.
Q: When you deposit money in a savings account at a bank, the bank pays you interest on that money. If…
A: Here our task is to implement a c# program that calculate the total amount after n years deposited…
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: Use switch case to write a C++ program that shows three options for the user 1) The first option is…
A: code : - #include <iostream> using namespace std; int main(){ // print message to user…
Q: Design and develop a simple program for the Air Force to label an aircraft as military of civilian.…
A: Introduction of Program: The C++ program takes speed as input from the user and then the program…
Q: Five students in college ; Mike, Abby, James, Anne, and Ali are preparing for an upcoming running…
A: Array syntax in c++ Declaration type <array-name>[array-size]; example : int m[10];…
Q: Trying to create this C++ program. I'm pretty inexperienced when it comes to C++ programming and…
A: Start box_cap<-24 container_cap<-75 boxes_req=cookies_cap/box_cap 5.…
Q: Kathryn bought 750 shares of stock for $35.00 per share. A year later she sold them for just $31.15…
A: the answer is given below:-
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: A military academy accepts candidates according to the following height and weight requirements…
A: FUNCTION boolean checkHeight (int height, char sex) if sex is 'M' or 'm' : return (h>=65…
Q: Programing Language: C++ Your time machine is capable of going forward in time up to 24 hours. The…
A: #include <iostream>#include <iomanip> using namespace std; int computeDifference(int…
Q: Write a program in c++ to prompt user to enter the salary and incentive.Company decides to deduct…
A: Program Approach - Use the header files and define the main function Declare the variables as per…
Q: cost of one small ball is 0.5 $ cost of one large ball is 1 $ Write a program in C++ to enter the…
A: Program Approach - Define the main function. Declare and initialize the variables as per code…
Q: Write a program to calculate electricity charges for a customer. The program requests a name,…
A:
Q: Design a C++ program for calculating BMI (body mass index), a measure for human body shape based on…
A: The complete C++ code is given below with code and output screenshot Proper exceptions are thrown
Q: Design a program that gives simple math quizzes. The program should display two random numbers that…
A: 1)Generate two random number and assign it to two variables 2)Add two numbers and store it in third…
Q: Description Write a C program that will input 10 names of student. Each student name has 4 exam…
A: Code as par your requirement: #include <stdio.h> struct student { char name[20];…
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: The following table shows how the monthly income of a salesperson can be calculated. Write a C…
A: Programming instructions: Include necessary header files. In the main, declare required…
Q: Exercise 1: Write a C++ program that displays a series of integer numbers starting from 1 to n,…
A: PROGRAM STRUCTURE: Include the required header files. Start the definition of the main function.…
Q: Germany has minimum marrying law in which if any person has age greater than 18 , they can marry.…
A: Requirements:- Germany has minimum marrying law in which if any person has an age greater than 18,…
Q: Mars hyper market gives discount to customers based on their spending. If a customer spends 20 Omani…
A: #include<iostream>using namespace std;int main(){ float spending; cin>>spending;…
Q: In C++ (Find the number of days in a month) Write a program that prompts the user to enter the…
A: Answer: This is my answer: But the complier reported: 1. Compiler error : fatal error 2. #include 3.…
Q: A rectangle is 4 times as long as it is wide. If the length is increased by 4 inches and the width…
A: #include <iostream>#include <cmath>using namespace std;int main() { double…
Q: Use a structure called Employee to write a C++ program that asks the user to enter his/her job…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Types of charges Room charges : Junior suite Deluxe suite Executive suite Critical care units:…
A: Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: XYZ Telegram Company charges P18.50 for a telegram that do not exceed 12 words and P1.50 for every…
A: Find the required code given as below and output:
Q: program that reads an integer sum in dollars and displays how many dollars bills of $100, $50, $20,…
A: program that reads an integer sum in dollars and displays how many dollars bills of $100, $50,…
Q: Write a program that calculates and writes the product of odd integers from 1 to 15. It must be…
A: I have given an answer in step 2.
Q: For each problem write a C++ program that asks the user for input, then calculates and displays…
A: #include<iostream> using namespace std; int main(){ int balance=8,choice;…
Q: The user is asked to find the sum of the values, starting from 1,2,3,4,5, up to the number entered…
A: /****************************************************************************** Welcome to GDB…
Q: Question: ACE balloon shop sells balloons to customers at 10 Fils each. If the customer buys…
A: Given: Write a C++ program to read no. of balloons to purchase and print the amount of bill in BD.
Q: Develop a C code that displays a menu to the user: (don forget to use c compiler to answer your home…
A: For creating the C program with the given description, following points are important: Include…
Q: In C program Write a program that calculates mileage reimbursement for a salesperson at a rate of…
A: Actually, program is executable software that runs on a computer.
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: A pair of primes that vary by two is a pair of twin primes (e.g., 3 and 5, 101 and 103). Write a C++…
A: Introduction: A pair of primes that vary by two is a pair of twin primes (e.g., 3 and 5, 101 and…
Q: write a c++ program to print and calculate these statements: Please Enter the amount due: 129.76…
A: In the code it will calculate the amount which has to be received by the customers in various…
Q: KEMBOJA Hospital provides top-notched medical care with comfortable rooms. The following are the…
A: “Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: A complex statement contains 5 variable a, b,c,d,e: Where a= (b-c) + (d+e) Interpret what might the…
A: Write a C Program which implements a = (b-c) + (d+e) equation and print the result it gives.
Q: Only Explain How This C++ Program Is working. write a Description/Explanation. Here's The program…
A: GIVEN CODDE #include<iostream>using namespace std; int main(){int…
Q: In C++ please write the code for this problem: A bag of cookies holds 30 cookies. The calorie…
A: According to the information given:- We have to create calories calculator.
Q: Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a…
A: using System;using System.Collections;using System.Globalization; using static System.Console;…
Q: Must create an interactive program (in C language) in which the computer generates a random number…
A: Here you need to ask the user for the input which number you can then compare to check with the…
Q: 10. Salary/Income Calculator Write a C program that computes an employee's monthly salary and…
A: C is a versatile middle-level programming language that can be used for a variety of tasks. It can…
Q: different categories. Write a c++ program that would input the wind speed in mph and would output…
A: #include<iostream> using namepsace std; int main(){ int speed; cout << "Enter wind…
Q: Use a structure called Time to write a C++ program that asks the user to enter a time value in…
A: The structure definition would be struct Time { int hour, sec, min; } We need to define a structure…
Q: Using C++ and Control Structures, write a program that uses the "System of Linear Equations" which…
A: A system of linear equations is usually a set of two linear equations with two variables
Q: Design a C++ program to do the administration for a fun run competition. Participants can run a…
A: Registration fees for club members are as follows:5km = R 65.0010km = R 100.0015km = R 150.00…
Q: Exercise 3: Write a C++ program that asks the user to enter the color code and prints the shade…
A: According to the Question below the solution: Program Output:
Q: NEED CODE IN C++ ON VISUAL STUDIO AND OUTPUT QUESTION The following table shows telephone area…
A: code :-- #include <iostream> using namespace std; int main(){ // get the code from user…
Q: The weather station of each city has the detail of rainfall in a year. Given the date and…
A: Required: The weather station of each city has the detail of rainfall in a year. Given the date…
A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a single serving equals 300 calories. Design and write a C++
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
- 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 screenA customer in a supermarket is purchasing four different items. The items and the exact quantities purchased are listed below: Item Quantity Candy 2 Apple 10 Cookies 3 Hot-Dog 5 Write a c++ program that stores the quantities of the four purchased items in four variables. Using the cout object, print the information about the quantities of each item purchased.A rectangle is 4 times as long as it is wide. If the length is increased by 4 inches and the width is decreased by 1 inch, the area will be X_AREA square inches. If X_AREA is entered by the user, create a program that will determine what were the dimensions (length and width) of the original rectangle using c++ compiler.
- how I should Write a program in c++ that prompts the user to input a number. The program should then output the number and a message saying whether the number is positive, negative, or zero. the program should contain comments explaining your work.Question 2: Write a C Program A bank wants a program that determines the yearly interest earned on a guaranteed investment certificate (GIC), given a number of years. If the investment is for five years, the interest is 8.2% per year; if it is for one year, the interest is 5%. Print on the screen "Invalid data. Please try again later.", if the user enters any value other than 1 or 5 for the number of years of investment. Write a complete C program to determine the amount of interest earned per year Hint: Interest - amount * percentageCreate a program that calculates the total cost of a restaurant bill, including tax and tip.Explanation: First, the program should ask the user for the cost of the meal. Then, the program should ask for the tax rate (in percentage) for the meal. Next, the program should ask for the tip rate (in percentage) for the meal. The program should then calculate the total cost of the meal, including tax and tip, and display the result to the user. In c# language please
- In C++ please write the code for this problem: A bag of cookies holds 30 cookies. The calorie information on the bag claims that there are 10 "servings" in the bag and that a serving equals 300 calories. Write a program that asks the user to input how many cookies they actually ate and then report how many total calories were consumed. use const integers for the 3 values provided in the program. Calculate the number of cookies in a serving. Calculate the number of calories in a cookie. Calculate the total calories consumedUse a structure called Employee to write a C++ program that asks the user to enter his/her job details (e.g. employee name, job title. salary, g ‘company name) and prints them out.In C Declare a variable of type double.Ask the user for a value and place it in the declared variable.Write code to check for and output statement stating whether the variable is zero, positive, ornegative.
- Need help with a C++ program Write a C++ program that helps a person determine how long they can hike for under various conditions on a given supply of water. Your program should prompt the user to enter how much water they can carry in liters. Then, for each of the following conditions, print out how many hours the user can hike for. - moderate temperature, moderate difficulty: 1/2 liter per hour- moderate temperature, high difficulty: 3/4 liter per hour- high temperature, moderate difficulty: 1 and 1/2 liters per hour- high temperature, high difficulty: 1 and 3/4 liters per hour SAMPLE OUTPUT Hello! Welcome to the Hiking Water Calculator!How many liters of water can you carry? 8 OK. Here is how long you can hike for on 8 liters of water under the following conditions: moderate temperature, moderate difficulty: 16 hoursmoderate temperature, high difficulty: 10.6666666 hourshigh temperature, moderate difficulty: 5.3333333 hourshigh temperature, high difficulty: 4.5714285 hours.…Question: USING C# 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 correctxyz is a telecom company,there are three recharge plans as listed below- 10$ - 50 Gb for 28 days 20$ - 150 Gb for 56 days 40$ - 350 Gb for 84 days write a program in c++ to ask user to which plans does he wants and display the cost of that recharge plan.