0
已解决
李熙尧
新手光能
新手光能
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
system("color f0");
int h,m,s;
cin>>h>>m>>s;
while(1){
system("cls");
if(h<0){
break;
}
cout<<h<<":"<<m<<":"<<s;
s--;
if(s<=0){
if(m<=0){
m+=60;
h--;
}
s+=60;
m--;
}
Sleep(1000);
}
cout<<"\n时间到";
while(1){
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
}
return 0;
}
0
已采纳
熊智晖
高级天翼
高级天翼
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
system("color f0");
int h,m,s;
cin>>h>>m>>s;
while(1){
system("cls");
if(h<0){
break;
}
cout<<h<<":"<<m<<":"<<s;
s--;
if(s<=0){
if(m<=0){
m+=60;
h--;
}
s+=60;
m--;
}
Sleep(1000);
}
cout<<"\n时间到";
while(1){
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
system("color 12");
system("color 23");
system("color 34");
system("color 45");
system("color 56");
system("color 67");
system("color 78");
system("color 81");
const int _oC = 277, _oD = 311, _oF = 370, _oG = 415, _oA = 466;
const int _C = 262, _D = 294, _E = 330, _F = 349, _G = 392, _A = 440, _B = 494;
const int oC = 554, oD = 622, oF = 740, oG = 831, oA = 932;
const int C = 523, D = 578, E = 659, F = 698, G = 784, A = 880, B = 988;
const int C_ = 1047, D_ = 1175, E_ = 1319, F_ = 1397, G_ = 1568, A_ = 1760, B_ = 1976;
const int oC_ = 1109, oD_ = 1245, oF_ = 1480, oG_ = 1661, oA_ = 1865;
const int T = 200; //一拍的长度
const int Stop = 0; //一拍休止符的长度
int i;
while(i!=10){
Beep(D,T*2);
Beep(D,T);
Beep(A,T);
Beep(G,T*2);
Beep(F,T*2);
Beep(E,T*2);
Beep(E,T);
Beep(E,T);
Beep(G,T*2);
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Beep(D,T*2);
Beep(D,T);
Beep( F, T );
Beep( E, T );
Beep( F, T );
Beep( E, T );
Beep(F,T);
Beep( D, T );
Beep( D, T );
Beep( F, T );
Beep( F, T );
Beep( E, T );
Beep( E, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( G, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T );
Beep( A, T);
Beep( A, T);
Beep( F, T );
Beep( E, T );
Beep( D, T);
Beep( C, T);
i++;
}
}
return 0;
}
应该加入黑人抬棺
望采纳
0
0
0
0