Clock_t類的使用

#include<stdio.h>
#include <iostream>
#include<stdlib.h>
#include<Windows.h>
#include<ctime>
#include<iso646.h>
void main()
{
using namespace std;
/*float sec;
cin >> sec;
clock_t delay = sec * CLOCKS_PER_SEC;
cout << "start\n";
clock_t start = clock();
while (clock() - start < delay)
;
cout << "done";
cout.setf(iostream::boolalpha);
char32_t x = U'\U0000222B';*/
int i[2];
for(int j = 0;j < 2;j++)
{
while (!(cin >> i[j]))
{
cin.clear();
cout << "請重新輸入";
while (cin.get() != '\n')
continue;
}
}
/*cin >> a;
cin >> b;
cout << b;*/
system("pause");
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章