C语言如何编程生日快乐代码


本文摘自PHP中文网,作者coldplay.xixi,侵删。

C语言编程生日快乐代码的方法:首先要按【CTRL+R】键,cmd进入命令行,输入pip install turtle安装第三方库;然后打开C语言编辑器,将相关代码复制进去;最后按快捷键F5进行保存且执行即可。

C语言编程生日快乐代码的方法:

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

#include <stdio.h>

#include <math.h>

#include <stdlib.h>

#define I 20

#define R 340

int main()

{

    system("mode con cols=80 lines=60  ");

    system("title 向你致以最诚挚的祝福!");

    char data[200][60]={{"祝你生日快乐!祝你生日快乐 !"},{"\nHappy birthday to you!\n"},{"Happy birthday my dear friend!\n"},

    {"在你面前的台里本,总有一天是很独特!\n"},{"虽然你和我,没办法选,来到世界的某刻。\n"},{"天气寒冷,又或炎热,又或者什么血型和星座!\n"},

    {"每年这刻,我对自己说,有生的日子要更快乐!\n"},{"天气寒冷,又或炎热,又或者什么血型和星座!\n"},{"每年这刻,我对自己说,有生的日子要更快乐!\n"},

    {"爸爸妈妈辛苦了!谢谢你们为我付出太多!\n"},{"生日祝福,吹灭蜡烛,我要我自己不许哭。 \n"},{"长大了一岁变得靠谱,继续走自己的旅程!\n"},

    {"又到这一个时刻,幸福的花火,手机祝福收到很多很多。\n"},{"看到最后一条来自你,写着让我感动的话语。\n"},{"亲爱的朋友要经常联络,我们一起来唱这首歌!\n"},

    {"祝你生日快乐额!我们一起快乐!\n"}

    };

    int sign = 0;

     

    int i,j,e;

    int a;

    long time;

    for(i=1,a=I;i<I/2;i++,a--)

    {

        for(j=(int) ( I-sqrt(I*I-(a-i)*(a-i)) );j>0;j--)

            printf(" ");

        for(e=1;e<=2*sqrt(I*I-(a-i)*(a-i));e++)

            printf("\3");

        for(j=(int)

            ( 2*( I-sqrt(I*I-(a-i)*(a-i)) ) );j>0;j--)

            printf(" ");

        for(e=1;e<=2*sqrt(I*I-(a-i)*(a-i));e++)

            printf("\3");

            printf("\n");

    }

    for(i=1;i<80;i++)

    {

        if(i==25)

        {

               printf("======祝昕妤,生日快乐。======");

            i+=30;

        }

            printf("\3");

    }

            printf("\n");

        for(i=1;i<=R/2;i++)

    {

        if(i%2||i%3)

            continue;

        for(j=(int) ( R-sqrt(R*R-i*i) );j>0;j--)

            printf(" ");

        for(e=1;e<=2*( sqrt(R*R-i*i) - (R-2*I) );e++)

            printf("\3");

            printf("\n");

    }

      

    for(; ; )

    {

        system("color a");

        for(time=0;time<99999999;time++); system("color b");

        for(time=0;time<99999999;time++); system("color c");

        for(time=0;time<99999999;time++); system("color d");

        for(time=0;time<99999999;time++); system("color e");

        for(time=0;time<99999999;time++); system("color f");

        for(time=0;time<99999999;time++);

        system("color 0"); for(time=0;time<99999999;time++);

        system("color 1"); for(time=0;time<99999999;time++);

        system("color 2"); for(time=0;time<99999999;time++);

        system("color 3"); for(time=0;time<99999999;time++);

        system("color 4");

        for(time=0;time<99999999;time++); system("color 5");

        for(time=0;time<99999999;time++); system("color 6");

        for(time=0;time<99999999;time++); system("color 7");

        for(time=0;time<99999999;time++); system("color 8");

        for(time=0;time<99999999;time++); system("color 9");

        for(time=0;time<99999999;time++); system("color ab");

        for(time=0;time<99999999;time++); system("color ac");

        for(time=0;time<99999999;time++); system("color ad");

        for(time=0;time<99999999;time++); system("color ae");

        for(time=0;time<99999999;time++); system("color af");

        for(time=0;time<99999999;time++);

         

        printf("%s",data[sign]);

        sign++;

         

    }

     

    return 0;

}

阅读剩余部分

相关阅读 >>

C语言num什么意思

C语言指针如何求最大值最小值

C语言注释详解

C语言源程序的扩展名是什么?

C语言的四大数据类型是什么?

c中scanf()和gets()之间的区别

C语言逗号表达式的运算规则

C语言中undeclared identifier是什么意思?

C语言怎么将小写转换为大写

C语言程序的执行总是起始于什么?

更多相关阅读请进入《C语言》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...