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

📄 hiscores.c

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

void main()
{
    FILE *scores;
    int s[10] = { 1000, 990, 985, 960,
        955, 950, 945, 945, 945, 930 };
    int x;

    scores=fopen("scores.dat","w");
    if(scores==NULL)
    {
        puts("Error creating file");
    }
    else
    {
        for(x=0;x<10;x++)
        {
            fprintf(scores,"%i\n",s[x]);
        }
        fclose(scores);
        puts("High scores saved to disk!");
    }
}

⌨️ 快捷键说明

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