-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab2.cpp
More file actions
42 lines (27 loc) · 980 Bytes
/
lab2.cpp
File metadata and controls
42 lines (27 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*Autumn Henderson
* Lab2
* August 29th, 2018
* Description: This program asks for a user's first and middle names, their age, and their address,
* and then outputs their movie star name, who they will play, and what their new address is.
*/
#include <iostream>
#include <string>
using namespace std;
int main(){
//Primary Variables
string firstName, middleName, streetName, streetType;
int age, numStreet;
//User Input
cout << "Enter your first and middle names: ";
cin >> firstName >> middleName;
cout << "Enter your age: ";
cin >> age;
cout << "Enter your street number, name, and type: ";
cin >> numStreet >> streetName >> streetType;
cout << "\n";
//User's new identity
cout << "Your movie star name is " << streetName << " " << middleName << ".\n";
cout << "You will play a " << (numStreet % age) * 3 << " year old.\n";
cout << "Your address is " << (age * 700) / numStreet << " " << firstName << " " << streetType << ".\n";
return 0;
}