heimsventus

Dailies 1 Ben Thompson #1-7

Jan 22nd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.98 KB | None | 0 0
  1. // Dailies 1 Ben Thompson 1 through 7.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7. using namespace std;
  8. int main()
  9. {
  10.     cout << "Daily 1 # 1 is below." << endl;
  11.     cout << "Hello, world " << "." << endl; //dailies1
  12.  
  13.     cout << "Daily 1 # 2 is below." << "\n";
  14.     string name;
  15.  
  16.     name = "Ben Thompson"; //assigns my name to name
  17.     cout << "Hello " << name << "\n";//dailies 2
  18.  
  19.     cout << "Daily 1 # 3 is below." << "\n";
  20.  
  21.     cout << "Hello my name is " << name << "\n";
  22.  
  23.     int age;
  24.     age = 29;
  25.     cout << "\n" << name << "'s age is " << age << endl;
  26.  
  27.     string hobbyone = "bowling";
  28.     string hobbytwo = "golf";
  29.     string hobbythree = "cards";
  30.     string hobbyfour = "gaming";
  31.     string hobbyfive = "running";
  32.     cout << name << "'s hobbies include " << hobbyone << ", " << hobbytwo << ", " << hobbythree << ", " << hobbyfour << ", and " << hobbyfive << "\n"; // dailies 3
  33.  
  34.     cout << "Daily 1 # 4 is below." << "\n";
  35.     cout << "    ______________________________|_______________________________" << "\n"
  36.     << "                      ----\\-- || ___ || -- / ----                 " << "\n"
  37.     << "                           \\  : == ^= = : /                       " << "\n"
  38.     << "                            \\    | o |   /                          " << "\n"
  39.     << "                             \\ ________ /                           " << "\n"; //ascii art from chris.com dalies 4
  40.  
  41.     cout << "Daily 1 # 5 is below. " << "\n";
  42.     double dinnerCost;
  43.     double tipPercent = 0.15;
  44.     double x = 0;
  45.     cout << "Please enter cost of the dinner, this program assumes 15% tip." << endl;
  46.     cin >> dinnerCost;
  47.     double tipAmount = dinnerCost*tipPercent;
  48.     double totalAmount = dinnerCost + tipAmount;
  49.     cout << "Your tip amount is " << tipAmount << "\n";
  50.     cout << " Your total amount is " << totalAmount << "\n";
  51.  
  52.     cout << "Daily 1 # 6 is below. " << "\n";
  53.     cout << "This portion of the program estimates Floor Tile costs." << "\n";
  54.     float width;
  55.     float length;
  56.     float cost;
  57.     cout << "Please enter length of the floor to tile." << endl;
  58.     cin >> length;
  59.     cout << "Now enter the width of the floor to tile." << "\n";
  60.     cin >> width;
  61.     cout << "Enter the cost per tile." << "\n";
  62.     cin >> cost;
  63.     float totalCost = ((length*width)*cost);
  64.     cout << "For a floor with a width of " << width << "and a length of " << length << " and assuming a cost per tile of " << cost << " the total cost will be " << totalCost << "." << "\n";
  65.     cout << "Daily 1 # 7 is below. " << "\n";
  66.     cout << " This calculation assumes the length, width and cost per tile in the calculation above." << "\n";
  67.     float laborcost;
  68.     cout << "Enter the labor cost per square foot of tile installed." << "\n";
  69.     cin >> laborcost;
  70.     float tiletotalcost = (laborcost*(length*width));
  71.     cout << "For a floor with a width of " << width << "and a length of " << length << " and assuming a labor cost per tile of " << laborcost << " the labor cost will be " << tiletotalcost << "." << "\n";
  72.  
  73.     system("pause");
  74.     return 0;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment