blob: 174cbf23c690788f8ee83cbc8a5eb264aa4a28ec (
plain) (
blame)
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
43
44
45
46
|
// Name: Connor McDowell
// date: 2/9/2024
// class: CST116
// assignment: Assignment 4 (homework)
#include <iostream>
#include "header.h"
using std::cout;
using std::cin;
using std::endl;
// user info from lecture
struct userDoB {
int month;
int day;
int year;
};
void main()
{
userDoB newUser = inputPersonal();
}
void printUser(userDoB newUser)
{
cout << "User's birthday is: " << newUser.month << "/" << newUser.day << "/" << newUser.year << endl;
}
userDoB inputPersonal()
{
userDoB user = {};
cout << "\n Please enter just the day you were born as a number: ";
cin >> user.day;
cout << "\n Please enter the month you were born as a number: ";
cin >> user.month;
cout << "\n Now please enter the year you were born as a number: ";
cin >> user.month;
return user;
}
|