问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

求赐教,用C++制作一个制作一个祝朋友生日快乐的程序!

发布网友 发布时间:2022-05-07 12:27

我来回答

2个回答

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:26

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:26

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:25

#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
char a;
color(12);
cout << "Do you want to see your BIRTHDAY CARD( Input y or n )?" << endl;
color(15);
cin >> a;
color(12);
if ( a=='y' ){
cout << "Ok, you will see your birthday card soon!" << endl;
} else {
cout << "That's OK, but happy birthday to you!" << endl;
return 0;
}
Sleep(1000);
color(268);
cout << "HAPPY ";
color(270);
cout << "BRITHDAY ";
color(9);
cout << "TO ";
color(10);
cout << "YOU!" << endl;
color(0);
Sleep(500);
cout << " ";
color(236);
cout << "********";
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************";
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
cout << "****************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "************" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "********" << endl;
Sleep(500);
color(0);
cout << " ";
color(236);
cout << "****" << endl;
Sleep(500);
char c[55] = { 'T' ,'h' ,'a' ,'n' ,'k', ' ' ,'y' ,'o' ,'u', ' ' ,'f' ,'o' ,'r', ' ' ,'l' ,'o' ,'o' ,'k' ,'i' ,'n' ,'g', ' ' ,'a' ,'f' ,'t' ,'e' ,'r', 's', ' ' ,'m' ,'e', ' ' ,'f' ,'o' ,'r', ' ' ,'e' ,'l' ,'e' ,'v' ,'e' ,'n', ' ' ,'y' ,'e' ,'a' ,'r' ,'s', ',', ' ' ,'m' ,'o' ,'m' ,'!', '0' };
for ( int i=0; i<=53; i++ ){
color( ( i+1 ) % 15 + 1 );
cout << c[i];
}
cout << endl;
Sleep(10000);
char d[12] = { 'I', ' ', 'l', 'o', 'v', 'e', ' ', 'y', 'o', 'u', '!', '0' };
int count = 0;
for ( int j=1; j<=1000; j++ ){
count++;
for ( int i=0; i<=10; i++ ){
color(i+1);
cout << d[i];
}
cout << " ";
}
cout << endl;
cout << "What present do you want(Input the number of the present)?" << endl;
char e;
cout << "A clothes(A); ???(B); Lipstick(C)" << endl;
cin >> e;
srand((unsigned)time(NULL));
for ( int i=1; i<=20; i++ ){
system( "cls" );
int s = 1;
int tmp = rand()%4;
switch( tmp ){
case 0:{
tmp++;
break;
}
case 1:{
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ####### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
break;
}
case 2:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " # # " << endl;
color(rand()%15+1);
s++;
cout << " ######### " << endl;
break;
}
case 3:{
color(rand()%15+1);
s++;
cout << " ######### " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " # " << endl;
color(rand()%15+1);
s++;
cout << " ######## " << endl;
break;
}
}
Sleep(i*50);
}
system ( "cls" );
switch( e ){
case 'A':{
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ####### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
break;
}
case 'B':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " # # " << endl;
color(rand()%15+1);
cout << " ######### " << endl;
break;
}
case 'c':{
color(rand()%15+1);
cout << " ######### " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " # " << endl;
color(rand()%15+1);
cout << " ######## " << endl;
break;
}
}
color(rand()%15+1);
cout << "You are very LUKY!" << endl;
cout << "Please turn your head!" << endl;
cout << "Tab return to continue...";
cout << endl;
color(0);
system( "pause" );
color(rand()%1023+1);
cout << "Are you happy?!" << endl;
color(rand()%1023+1);
cout << "I think you are!!!" << endl;
color(rand()%1023+1);
cout << "...-..---..-.-.--!";
Sleep ( 3000 );
cout << endl;
color(15);
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
cout << " #" << endl;
cout << "######" << endl;
Sleep( 2000 );
system( "cls" );
cout << " @@@@ " << endl;
cout << "@ @" << endl;
cout << " @ " << endl;
cout << " @ " << endl;
cout << "@@@@@@" << endl;
Sleep ( 2000 );
system( "cls" );
cout << " !! " << endl;
cout << " !!! " << endl;
cout << " !! " << endl;
cout << " !! " << endl;
cout << "!!!!!!" << endl;
Sleep ( 2000 );
system( "cls" );
color( rand()%1023+1 );
cout << " ###### # # ###### # " << endl;
cout << " # # # # # # " << endl;
cout << " # # # # # # " << endl;
cout << " ###### # ###### # " << endl;
cout << " # # # # # " << endl;
cout << " # # # # " << endl;
cout << " ###### # ###### # " << endl;
color(15);
return 0;
}
仅供参考!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

热心网友 时间:2023-10-30 19:26

MFC是你的好朋友~

热心网友 时间:2023-10-30 19:26

MFC是你的好朋友~
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
泰勒公式有哪些常见形式? 空调室内风机怎样工作 什么是县级以上医院 关于聚金宝 买白银问题 平安银行个人贵金属交易业务有哪些? 网易云音乐为什么歌这么少? 公路边种的有什么花 高速路上常用的绿化花卉有那些? 公路绿化用什么花 我一键开核后顺利进入WIN7 系统,可是一开网站就重启是怎么回事,我开6... 形容眉毛的词语有哪些? 形容“眉毛”的词语有哪些? 描写眉毛的词语 形容眉毛美丽的词语 额头和下巴无论什么时候总是长红肿会变白的痘…怎么去最快? 我额头和下巴为什么会长好多小痘痘,挤出来是白色的垃圾样,好像是每个毛孔都堵死了似的,反反复复的长, 我额头上的痘痘是怎么回事?小米粒状,还有下巴两个白色的包包,很硬 以前皮肤很容易过敏,起红色小痘痘,现在下巴额头和两侠起白色小痘痘是什么原因? 下巴嘴边周围长了一颗颗的东西。又不是痘痘,现在脸上额头也有。下巴可以挤出来白色的。到底是什么?新人 额头和下巴长痘痘,里面有白米粒是怎么回事 额头和下巴长脓包型痘痘 脑门和下巴长疙瘩是怎么回事 我额头和下巴上长了很多小痘痘,密密麻麻的,会挤出白色的东西,长不 额头,下巴脸颊都有痘痘,脸颊较多,有些发红,有些长白头,有的像小疙瘩一样,该怎么治疗啊? 脸颊,额头,下巴,长了许多小痘痘!疙瘩里面有白色的东西!越来越多,这是怎么了? 下巴经常长带白头的红肿痘痘怎么回事 脸上长白色的小疙瘩,大多在下巴,额头也有一点,下巴密密麻麻的好多!烦死了,而且经常起,隔半个月左右 右脸额头下巴都起了好多白色痘痘!是怎么回事啊特严重? 下巴上长了好多冒白头的痘痘,额头上也是,反复长,不知道怎么才能治好?去看中医有用吗? 额头和下巴长疙瘩像粉刺一样还出白头还疼该怎么治 小米11.0.3系统怎样清理其它文件? C语言 朋友过生日 求这个怎么写!!! 股票的除权参考价是多少? 求大侠用C程序编程做一个祝女朋友生日快乐的程序。。。 什么叫每股理论除权价格 microsoft visual c++ 2008怎么用 设置拒登录换绑怎么恢复? 微信里不小心点了“拒绝接收来自此应用的所有消息”,怎么改回来? 你已设置拒换绑在哪里解除? 梦见水刚开始是清澈的,越接越混了 outlook2007设置outlook邮箱账户 51是什么意思呢? C语言怎么在vc2008中运行 51论坛的网址是多少 51论坛群组帖子的下面可以放谷歌广告吗? 51论坛在那里? 51fusa功能安全社区是做什么的呢?有人知道吗。 河北邯郸家庭教育指导师什么时候考试 微星2070魔龙显卡对比影驰2070大将显卡那个好? 影驰2070super大将吃鸡怎么调整体图像质量?