- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMagicDate.cpp
More file actions
Latest commit
30 lines (26 loc) · 580 Bytes
/
Copy pathMagicDate.cpp
File metadata and controls
30 lines (26 loc) · 580 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
//CSC114-651
//Student: Christopher Yonek (700642859)
//Assignment: Create a program that checks if the month times day is equal to the years digit.
//Date: September 2018
#include"pch.h"
#include<iostream>
#include<iomanip>
#include<conio.h>
usingnamespacestd;
intmain()
{
int month, day, yeardigit;
cout << "Enter the month, day, and digit year\n";
cin >> month;
cin >> day;
cin >> yeardigit;
if (month * day == yeardigit)
{
cout << "The date is magic.";
}
else {
cout << "The date is not magic";
}
_getch;
return0;
}