Question: Find your days alive using C++ This code might help // note 104 for 2004 // counts years from 1900 // notice June = 5
Find your days alive using C++
This code might help
// note 104 for 2004
// counts years from 1900
// notice June = 5 is not 6
// find an online days between two dates calculator and verify this code
#include
#include
int main()
{
struct std::tm a = {0,0,0,24,5,104}; /* June 24, 2004 */
struct std::tm b = {0,0,0,5,6,104}; /* July 5, 2004 */
std::time_t x = std::mktime(&a);
std::time_t y = std::mktime(&b);
if ( x != (std::time_t)(-1) && y != (std::time_t)(-1) )
{
double difference = std::difftime(y, x) / (60 * 60 * 24);
std::cout
std::cout
std::cout
}
return 0;
}
After you find aout your days alive Add biorhythm calculations (23/28/33)
Calculation
Theories published state the equations for the cycles as:
physical: {\displaystyle \sin(2\pi t/23)}
emotional: {sin(2\pi t/28)}
intellectual: {sin(2\pi t/33)}
where {t} indicates the number of days since birth. Basic arithmetic shows that the combination of the simpler 23- and 28-day cycles repeats every 644 days (or 1-3/4 years), while the triple combination of 23-, 28-, and 33-day cycles repeats every 21,252 days (or 58.2+ years).

physical: sin(2nt/23), emotional: sin(2mt/28), intellectual: sin(2mt/33)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
