当前位置:   article > 正文

输出母亲节祝福_用c++祝母亲三八妇女节快乐

用c++祝母亲三八妇女节快乐

输出母亲节祝福


关于背景和前景颜色的设置,可以参考 https://blog.csdn.net/qq_31790997/article/details/90114169

/*********************************************************************

* 题目:输出母亲节祝福 
* 作者:小韦同学
* 邮箱:weichangying_wcy@163.com
	
*********************************************************************/

#include<bits/stdc++.h>
#include<windows.h>

using namespace std;

const int stoptimeshort = 50;
const int stoptimelong = 500;

// 输出的矩阵 
// 输出 I love U 
int love[9][37] = 
{
0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0
};
// 输出 母亲节快乐 
int happy[12][65] = 
{
0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0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,0,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,1,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,
0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0
};


int main() {
	
    // 黑框程序标题 
    system ("title 母亲节祝福");
    
    // 改变背景颜色和字体颜色
	system ("color 03");  // 黑底,湖蓝色字  
  
    // 从容的走过了最美丽的岁月 
    cout << "        ";
    cout << "从";
    Sleep ( stoptimeshort );
    cout << "容";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "走";
    Sleep ( stoptimeshort );
    cout << "过";
    Sleep ( stoptimeshort );
    cout << "了";
    Sleep ( stoptimeshort );
    cout << "最";
    Sleep ( stoptimeshort );
    cout << "美";
    Sleep ( stoptimeshort );
    cout << "丽";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "岁";
    Sleep ( stoptimeshort );
    cout << "月" << endl;
    
    // 无悔的度过了最浪漫的年华 
    cout << "        ";
    system ( "color 72" );
    Sleep ( stoptimelong );
    cout << "无";
    Sleep ( stoptimeshort );
    cout << "悔";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "度";
    Sleep ( stoptimeshort );
    cout << "过";
    Sleep ( stoptimeshort );
    cout << "了";
    Sleep ( stoptimeshort );
    cout << "最";
    Sleep ( stoptimeshort );
    cout << "浪";
    Sleep ( stoptimeshort );
    cout << "漫";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "年";
    Sleep ( stoptimeshort );
    cout << "华" << endl;
    
    // 安静的沉没了您的灿烂 
    cout << "        ";
    system ( "color 79" );
    Sleep ( stoptimelong );
    cout << "安";
    Sleep ( stoptimeshort );
    cout << "静";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "沉";
    Sleep ( stoptimeshort );
    cout << "没";
    Sleep ( stoptimeshort );
    cout << "了";
    Sleep ( stoptimeshort );
    cout << "您";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "灿";
    Sleep ( stoptimeshort );
    cout << "烂" << endl;
    
    // 把最好的留给了我们 
    cout << "        ";
    system ( "color 7B" );
    Sleep ( stoptimeshort );
    cout << "把";
    Sleep ( stoptimeshort );
    cout << "最";
    Sleep ( stoptimeshort );
    cout << "好";
    Sleep ( stoptimeshort );
    cout << "的";
    Sleep ( stoptimeshort );
    cout << "留";
    Sleep ( stoptimeshort );
    cout << "给";
    Sleep ( stoptimeshort );
    cout << "了";
    Sleep ( stoptimeshort );
    cout << "我";
    Sleep ( stoptimeshort );
    cout << "们" << endl;
    
    Sleep ( stoptimelong );
    
    // 母亲节到了,祝全天下所有的母亲: 
    cout << "        ";
    system ( "color 7E" );
    Sleep ( stoptimeshort );
    cout << "母";
    Sleep ( stoptimeshort );
    cout << "亲";
    Sleep ( stoptimeshort );
    cout << "节";
    Sleep ( stoptimeshort );
    cout << "到";
    Sleep ( stoptimeshort );
    cout << "了,";
    Sleep ( stoptimeshort );
    cout << "祝";
    Sleep ( stoptimelong );
    cout << "美";
    Sleep ( stoptimelong );
    cout << "美";
    Sleep ( stoptimelong );
    cout << "的";
    Sleep ( stoptimelong );
    cout << "母";
    Sleep ( stoptimelong );
    cout << "亲";
    Sleep ( stoptimelong );
    cout << "大";
    Sleep ( stoptimelong );
    cout << "人:" << endl; 
    
	// 母亲节快乐,幸福安康! 
    cout << "        ";
    system ( "color 79" );
    Sleep ( stoptimelong );
    cout << "母";
    Sleep ( stoptimelong );
    cout << "亲";
    Sleep ( stoptimelong );
    cout << "节";
    Sleep ( stoptimelong );
    cout << "快";
    Sleep ( stoptimeshort );
    cout << "乐,";
    Sleep ( stoptimelong );
    cout << "幸";
    Sleep ( stoptimelong );
    cout << "福";
    Sleep ( stoptimelong );
    cout << "安";
    Sleep ( stoptimelong );
    cout << "康!" << endl << endl;
    
    // 输出 母亲节快乐 
    Sleep ( stoptimelong );
    system ( "color FC" );
    for ( int i = 0; i < 12; i++ ) {
        cout<<"        ";
        for ( int j = 0; j < 65; j++ ) {
            if ( happy[i][j] == 0 )
                cout << " ";
            else
                cout << "*";
        }
        cout << endl;
        Sleep ( 100 );
    }
    
    cout << endl << endl;
    cout << "        ";
    Sleep ( stoptimelong );
    system ( "color 79" );
    // 妈妈您辛苦了,我爱您 
    Sleep ( stoptimelong );
    cout << "妈";
    Sleep ( stoptimeshort );
    cout << "妈";
    Sleep ( stoptimeshort );
    cout << "您";
    Sleep ( stoptimeshort );
    cout << "辛";
    Sleep ( stoptimeshort );
    cout << "苦";
    Sleep ( stoptimeshort );
    cout << "了,";
    Sleep ( stoptimeshort );
    cout << "我";
    Sleep ( stoptimeshort );
    cout << "爱";
    Sleep ( stoptimeshort );
    cout << "您!" << endl << endl;
    
    // 输出 I LOVE U
    Sleep ( stoptimelong );
    system ( "color 97" );
    for ( int i = 0; i < 9; i++ ) {
        cout<<"        ";
        for ( int j = 0; j < 37; j++ ) {
            if ( love[i][j] == 0 )
                cout << " ";
            else
                cout << "*";
        }
        cout << endl;
        Sleep ( 100 );
    }
    
    cout << "                                                        女儿:小韦同学 敬上" << endl;  
    
    return 0;
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/804473
推荐阅读
相关标签
  

闽ICP备14008679号