📄 zp1242.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
#include <stdio.h>
#include <math.h>
int main(int argc, char* argv[])
{
int w,d,x,cs=0;
while (scanf("%d%d",&w,&d) && w && d)
{
x=57.3*log(1.0*d/w/810)/log(1.0/2)+0.5;
printf("Sample #%d\n",++cs);
if (x==0)
printf("The approximate age is 0 years.\n\n");
else
if (x<100)
printf("The approximate age is %d00 years.\n\n",x);
else
{
x+=5;
x/=10;
printf("The approximate age is %d000 years.\n\n",x);
}
}
return 0;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -