Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Dailies 1 Ben Thompson 1 through 7.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- cout << "Daily 1 # 1 is below." << endl;
- cout << "Hello, world " << "." << endl; //dailies1
- cout << "Daily 1 # 2 is below." << "\n";
- string name;
- name = "Ben Thompson"; //assigns my name to name
- cout << "Hello " << name << "\n";//dailies 2
- cout << "Daily 1 # 3 is below." << "\n";
- cout << "Hello my name is " << name << "\n";
- int age;
- age = 29;
- cout << "\n" << name << "'s age is " << age << endl;
- string hobbyone = "bowling";
- string hobbytwo = "golf";
- string hobbythree = "cards";
- string hobbyfour = "gaming";
- string hobbyfive = "running";
- cout << name << "'s hobbies include " << hobbyone << ", " << hobbytwo << ", " << hobbythree << ", " << hobbyfour << ", and " << hobbyfive << "\n"; // dailies 3
- cout << "Daily 1 # 4 is below." << "\n";
- cout << " ______________________________|_______________________________" << "\n"
- << " ----\\-- || ___ || -- / ---- " << "\n"
- << " \\ : == ^= = : / " << "\n"
- << " \\ | o | / " << "\n"
- << " \\ ________ / " << "\n"; //ascii art from chris.com dalies 4
- cout << "Daily 1 # 5 is below. " << "\n";
- double dinnerCost;
- double tipPercent = 0.15;
- double x = 0;
- cout << "Please enter cost of the dinner, this program assumes 15% tip." << endl;
- cin >> dinnerCost;
- double tipAmount = dinnerCost*tipPercent;
- double totalAmount = dinnerCost + tipAmount;
- cout << "Your tip amount is " << tipAmount << "\n";
- cout << " Your total amount is " << totalAmount << "\n";
- cout << "Daily 1 # 6 is below. " << "\n";
- cout << "This portion of the program estimates Floor Tile costs." << "\n";
- float width;
- float length;
- float cost;
- cout << "Please enter length of the floor to tile." << endl;
- cin >> length;
- cout << "Now enter the width of the floor to tile." << "\n";
- cin >> width;
- cout << "Enter the cost per tile." << "\n";
- cin >> cost;
- float totalCost = ((length*width)*cost);
- 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";
- cout << "Daily 1 # 7 is below. " << "\n";
- cout << " This calculation assumes the length, width and cost per tile in the calculation above." << "\n";
- float laborcost;
- cout << "Enter the labor cost per square foot of tile installed." << "\n";
- cin >> laborcost;
- float tiletotalcost = (laborcost*(length*width));
- 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";
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment