谈物理吧 关注:10贴子:64
  • 0回复贴,共1
#include<iostream>
#include<ctime>
#include<cmath>
using namespace std;
int main()
{
int i, a,r,m,f;
double s,t,j;
t = 0.32448;
j = 0.64869;
a = 100000100;
clock_t start = clock();
for (i = 100000000; i <= a; i++)
{
for (f = 1; f <= i;f++)
{m = i * i * i + 3 * i * i + 65;
t = t * 0.2548+t*t*t;
j = j + t;
}
cout <<"已完成"<< i-100000000 <<"%"<<"过程中请勿点击窗口"<< endl;
}
clock_t end = clock();
cout <<"测试用时"<<( end - start)/(CLOCKS_PER_SEC*1)<<"秒" << endl;
s = 100000000 / (end - start);
cout <<"您的CPU单线程性能分数为"<< s<<endl;
cout << "请点击右上角X退出";
cin>>r;
}


IP属地:吉林来自Android客户端1楼2020-11-05 20:58回复