# include <iostream.h>
int main()
{
int age,heartbeats;
cout<<"Enter Age: ";
cin>>age;
cout<<"Enter Number of Heartbeats per min: ";
cin>>heartbeats;
heartbeats = heartbeats * 60; //heartbeats per hour
heartbeats = heartbeats * 24; //heartbeats per day
heartbeats = heartbeats * 365; //heartbeats per year
cout<<"Your Heart has beat "<<heartbeats * age<<" times since you were born."<<endl;
return 0;
}
int main()
{
int age,heartbeats;
cout<<"Enter Age: ";
cin>>age;
cout<<"Enter Number of Heartbeats per min: ";
cin>>heartbeats;
heartbeats = heartbeats * 60; //heartbeats per hour
heartbeats = heartbeats * 24; //heartbeats per day
heartbeats = heartbeats * 365; //heartbeats per year
cout<<"Your Heart has beat "<<heartbeats * age<<" times since you were born."<<endl;
return 0;
}
-----------------------OUTPUT---------------------
Enter Age: 26
Enter Number of Heartbeats per min: 70
Your Heart has beat 956592000 times since you were born.