⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oz4.c

📁 C.Game.Programming.For.Dummies.原码
💻 C
字号:
#include <stdio.h>
#include <string.h>

void main()
{
    struct oz {
        char actor[30];
        char character[30];
        int age;
        };

    struct oz actor[4];
    int x;

    strcpy(actor[0].actor,"Judy Garland");
    strcpy(actor[0].character,"Dorothy");
    actor[0].age = 17;

    strcpy(actor[1].actor,"Ray Bolger");
    strcpy(actor[1].character,"Scarecrow");
    actor[1].age = 35;

    strcpy(actor[2].actor,"Bert Lahr");
    strcpy(actor[2].character,"Cowardly Lion");
    actor[2].age = 44;

    strcpy(actor[3].actor,"Jack Haley");
    strcpy(actor[3].character,"Tin Woodsman");
    actor[3].age = 40;

    puts("Wizard of Oz Database!");

    for(x=0;x<4;x++)
        printf("%s played %s, and was %i-years-old\n",\
            actor[x].actor,actor[x].character,\
            actor[x].age);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -