class update 12.14
This commit is contained in:
parent
c6ae7c7889
commit
a1ea243478
20
class.cpp
Normal file
20
class.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#include<iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
long long cheng=1,num2,num1;
|
||||||
|
cout <<"请输入第一个数字:";
|
||||||
|
cin >>num1;
|
||||||
|
|
||||||
|
cout <<"请输第二个数字,每输一个数字,空一格,再输一个数字(Enter结束):";
|
||||||
|
for (int i = 1; i <= num1; i++)
|
||||||
|
{
|
||||||
|
cin >>num2;
|
||||||
|
cheng *=num2;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout <<cheng<<endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
17
class/dao_ji_shi.cpp
Normal file
17
class/dao_ji_shi.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//倒计时
|
||||||
|
|
||||||
|
#include<iostream>
|
||||||
|
#include<windows.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
for (int i = 15; i > 0; i--)
|
||||||
|
{
|
||||||
|
cout <<"距离考试结束还剩:"<<i<<"分钟"<<endl;
|
||||||
|
Sleep(60000);
|
||||||
|
}
|
||||||
|
cout <<"考试结束!"<<endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user