QuestionQuestion

1) Moon Weight Calculation:
Your weight is actually the amount of gravitational force exerted on you by the earth. Moons gravity is one sixth (0.167)that of the earth gravity.Write a program that asks the user to enter his/her weight on the earth and display the corresponding weight on the moon. The cpp file name should be moon.cpp.
2) How many calories:
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 serving equals 300 calories. Write a program that asks the user to input how many cookies that he/she ate and the report how many total calories were consumed. The cpp file name should be cookies.cpp.
3) Word game:
Write a C++ program that plays a word game with the user.The program should ask the user to enter the following:
- Name
- Age
- The name of the City
- The name of the College
- A profession
- A type of an animal
- A pet’s name
After user has entered these items, the program should display the following story, inserting the user’s input into the appropriate locations.
There once was a person named NAME who lived in CITY. At the age of AGE,NAME went to college at COLLEGE. NAME graduated and went to work as a PROFESSION. Then,NAME adopted a(n) ANIMAL named PETNAME. They both lived happily ever after. Hint: use appropriate date types for each variable. The cpp file name should be wordgame.cpp.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

include<iostream>
#include<string>

using namespace std;

int main()
{
string name, city, college, profession, animal_type, petname;
int age;

cout << "Enter name= ";
getline(cin, name);
cout << "Enter age= ";
cin >> age;
cin.ignore();//removes unuseful data remained in the buffer after allocating the "int" variable
cout << "Enter the city name= ";...

By purchasing this solution you'll be able to access the following files:
ExtraCredit.zip.

50% discount

Hours
Minutes
Seconds
$8.00 $4.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats