当前位置:   article > 正文

C语言-属于程序员的浪漫“英语四级考试加油”_c语言加油代码

c语言加油代码

博主初次写博客,写的不好请不要介意啦 

编译采用逐步显示的方法,使内容一步一步显示,也就是本人喜欢的样式,但最后爱心为啥是框框也就不知道了,有的电脑可以显示有的却不行,博主也只有这个水平啦

  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include<stdio.h>
  3. #include<Windows.h>
  4. #include<stdlib.h>
  5. void AINI()
  6. {
  7. int i;
  8. for(i=0; i<8; i++)
  9. {
  10. switch(i)
  11. {
  12. case 1:
  13. printf("\t\t\t\t\t--------请输入要加油人名字:--------\n");
  14. printf("\n");
  15. Sleep(1000);
  16. break;
  17. case 2:
  18. printf("\t\t\t\t\t-------------某某大宝贝-------------\n");
  19. printf("\n");
  20. Sleep(1000);
  21. break;
  22. case 3:
  23. printf("\t\t\t\t\t-------恭喜你通过英语四级考试-------\n");
  24. printf("\n");
  25. Sleep(1000);
  26. break;
  27. case 4:
  28. printf("\t\t\t\t\t------------四级考试就这------------\n");
  29. printf("\n");
  30. Sleep(1000);
  31. break;
  32. case 5:
  33. printf("\t\t\t\t\t------------宝贝轻松拿捏------------\n");
  34. printf("\n");
  35. Sleep(1000);
  36. break;
  37. case 6:
  38. printf("\t\t\t\t\t------马上为你传送某某的小心心------\n");
  39. printf("\n");
  40. Sleep(1000);
  41. break;
  42. case 7:
  43. printf("\t\t\t\t\t---(^-^)加油,(^-^)加油,(^-^)加油---\n");
  44. printf("\n");
  45. Sleep(1000);
  46. default:
  47. break;
  48. }
  49. }
  50. }
  51. void xin()
  52. {
  53. int i, j, k, l, m;
  54. char c=3;
  55. for (i=1; i<=5; i++) printf("\n");
  56. for (i=1; i<=3; i++)
  57. {
  58. for (j=1; j<=50-2*i; j++) printf(" ");
  59. Sleep(400);
  60. for (k=1; k<=4*i+1; k++) printf("%c", c);
  61. for (l=1; l<=13-4*i; l++) printf(" ");
  62. Sleep(400);
  63. for (m=1; m<=4*i+1; m++) printf("%c", c);
  64. printf("\n");
  65. }
  66. for (i=1; i<=3; i++)
  67. {
  68. for (j=1; j<=42+1; j++) printf(" ");
  69. Sleep(400);
  70. for (k=1; k<=29; k++) printf("%c", c);
  71. printf("\n");
  72. }
  73. for (i=7; i>=1; i--)
  74. {
  75. for (j=1; j<=58-2*i; j++) printf(" ");
  76. Sleep(400);
  77. for (k=1; k<=4*i-1; k++) printf("%c", c);
  78. printf("\n");
  79. }
  80. for (i=1; i<=57; i++) printf(" ");
  81. Sleep(400);
  82. printf("%c\n", c);
  83. for (i=1; i<=5; i++) printf("\n");
  84. }
  85. int main()
  86. {
  87. char name[100];
  88. int op;
  89. printf("\t\t\t\t\t--------四级英语考试加油必备--------\n");
  90. printf("\t\t\t\t\t请输入要加油的宝贝:");
  91. scanf("%s",&name[20]);
  92. printf("\n\t\t\t\t\t请输入加油指令:");
  93. scanf("%d",&op);
  94. switch(op)
  95. {
  96. case 520:
  97. AINI();
  98. break;
  99. default:
  100. break;
  101. }
  102. xin();
  103. return 0;
  104. }

 爱心代码源自csdn另外一位博主:程序员张小妍c语言爱心代码_程序媛张小妍的博客-CSDN博客_爱心程序代码

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/578636
推荐阅读
相关标签
  

闽ICP备14008679号