复制内容到剪贴板
代码:
//usage:distance of a lightyear
//author:zhponly
//date:20080414
//edit:none
//edition:none
//vc++6.0+windows xp
#include<iostream>
void PrintDistanceOfL(void);
using namespace std;
int main(void)
{
PrintDistanceOfL();
return 0;
}
void PrintDistanceOfL(void)
{
long unsigned int Result; //result
unsigned int DayOfYear=365;
unsigned int SecondsOfDay=864; //secondsofday=864*1 00
unsigned int SpeedOfL=35; //speedofl=35*1 0000 0000m
Result=DayOfYear*SecondsOfDay*SpeedOfL;
cout<<Result; //less of 00 0000 0000
for(int i=0;i<10;i++)
cout<<0; // 00 0000 0000
cout<<endl; //change line
}