Need some help to write a program that uses a loop to display the number of calories burned after running on a treadmill for 10, 15, 20, 25, and 30 minutes. Running on a treadmill burns 3.9 calories per minute. 

Need some help to write a program that uses a loop to display the number of calories burned after

running on a treadmill for 10, 15, 20, 25, and 30 minutes. Running on a treadmill burns 3.9 calories per minute.

Sample Output from Program:

39.0 calories were burned after 10 minutes.

58.5 calories were burned after 15 minutes.

78.0 calories were burned after 20 minutes.

97.5 calories were burned after 25 minutes.

117.0 calories were burned after 30 minutes.

Press any key to continue….

Using the pseudocode below, write the code that will meet the requirements.

Display program information

Declare variables

For i=10 to 30 step 5

   Print i*calories

End for

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

So I am having trouble writing this in Visual Studio as a console application (C++),

So I am having trouble writing this in Visual Studio as a console application (C++), here is what I tried running

but it’s not working for me. Could someone help me? my code:

// ConsoleApplication3.cpp : Defines the entry point for the console application.

// —————————————————————

// Programming Assignment: LAB1C

// Developer: _____Mark Baker____________

// Date Written: ______03/10/2018___________

// Purpose: Ticket sales at movie theater

//use fixed and setprecision(2) to format the number

//use setw(8) to control the width of the field

//use t to control the spacing between fields

// —————————————————————

#include “stdafx.h”

#include <iomanip>

#include <iostream>

using namespace std;

int main()

{

double totalAdult, totalChild, grossProfit, netProfit, distributorAmt;

int adultTkts, childTkts;

cout << “Please enter number of child tickets: “;

cin >> childTkts;

cout << “Please enter number of adult tickets: “;

cin >> adultTkts;

cout << totalChild = (6 * childTkts);

cin >> totalAdult = (10 * adultTkts);

cout << grossProfit = totalAdult + totalChild;

cin >> netProfit = (grossProfit * 0.2);

cout << distributorAmt = grossProfit – netProfit;

cout << Output = grossProfit;

cout << Output = netProfit;

cin >> Output = distributorAmt;

cout << fixed << setprecision(2);

cout << “Gross Profit :t $” << setw(8) << grossProfit << endl;

}

Write a program that calculates and displays the revenue earned from ticket sales at a movie theater.

Input: Prompt the user for the number of adult tickets. Prompt the user for the number of child tickets.

Process: Perform the calculations. The adult tickets cost $10.00 and the child tickets cost $6.00. The theater keeps 20% of the gross box office profit, and the rest goes to the movie distributor.

Output: Display the results.

Sample Output from Lab 1:

 

 

Pseudo Code:

1. Declare variables

2. Accept Input – child tickets and adult tickets

3. Calculate Child ticket total = child tickets* 6

4. Calculate adult ticket total = adult tickets * 10

5. Calculate gross profit = child ticket total + adult ticket total

6. Calculate net profit = gross profit *0.2

7. Calculate distributor amount = gross profit – net profit

8. Display the following on separate lines and format variables with $ and decimal.

a. Gross Profit    value of gross profit

b. Net Profit      value of net profit

c. Distributor Amount   value of distributor amount

//include the iomanip header file at the top of the file

#include <iomanip>

//use fixed and setprecision(2) to format the number

//use setw(8) to control the width of the field

//use t to control the spacing between fields

cout << fixed << setprecision(2);

cout << “Gross Profit :t $” << setw(8) << grossProfit << endl;

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

I need help with creating Rectangle class that has the following member variables

I need help with creating Rectangle class that has the following member

variables.

  • length
  • width

The class should have the following member functions.

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

You are developing a software package that requires users to enter their own passwords

You are developing a software package that requires users to enter their own passwords. Loop until the passwords

meet the software criteria.

  • The password should be at least six characters long.
  • The password should contain at least one uppercase and one lowercase letter.
  • The password should have at least one digit.

The program should have an isValid function that will test if the password is valid. Use the following code to declare a password variable with a global constant int SIZE=80;

char password[SIZE].

Next, use a while(true) to continue looping until the user enters a valid password. Read in the password and call the isValid program. You can use the isupper(), islower(), and isdigit() functions

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"