Skip to content

Instantly share code, notes, and snippets.

@sprintr
Created January 26, 2013 13:11
Show Gist options
  • Save sprintr/4642297 to your computer and use it in GitHub Desktop.
Save sprintr/4642297 to your computer and use it in GitHub Desktop.
Age into seconds calculator
#include <iostream.h>
void main(void)
{
int age = 0, ageInSeconds = 0;
cout << "Enter your age: " << endl;
cin >> age;
ageInSeconds = age * 365 * 24 * 60 * 60;
cout << "Your life in seconds is: " << age;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment