#include <iostream>
#include <cctype>
#include <limits>
int main()
{
std::cout << "Do you want someone to do all the work for you? ";
char answer { };
std::cin >> answer;
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
if (std::toupper(answer) == 'Y' ) { std::cout << "Post it in the Jobs section.\n"; }
else { std::cout << "Show what you have coded so far.\n"; }
std::cout << "Good luck.\n";
}
int main()
{
auto t = time(0);
auto s = (string)ctime(&t);
auto i = stoi(s.substr(s.length()-6,s.length()));
int bdy;
cout << "enter your bd year>";
cin >> bdy;
uint64_t x[] = {0X6820756f79206669, 0X2064616820657661, 0X2064622072756f79, 0X6165792073696874,
0X726120756f792072, 0X2020202020203a65, 0X756f792065736c65, 0X0020203a65726120 };
sprintf((char*)(&x[5]) +2,"%i", i-- -bdy);
*((char*)(&x[5]) +4) = ' ';
sprintf((char*)(&x[7]) +6,"%i", i-bdy);
cout << (char*)x << endl;
}
edit, fixed... was off by 1 year because while testing all the offsets I forgot to test the actual progam...
output:
enter your bd year>1950
if you have had your bd this year you are:69 else you are: 68