commit
64a4a79385
@ -0,0 +1,43 @@
|
||||
# Project: СѧÉú²âÑé
|
||||
# Makefile created by Dev-C++ 5.11
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = main.o test.o record.o load.o ../pupil_test/save.o setting.o
|
||||
LINKOBJ = main.o test.o record.o load.o ../pupil_test/save.o setting.o
|
||||
LIBS = -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib" -static-libgcc
|
||||
INCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
|
||||
CXXINCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
|
||||
BIN = СѧÉú²âÑé.exe
|
||||
CXXFLAGS = $(CXXINCS) -std=c99
|
||||
CFLAGS = $(INCS) -std=c99
|
||||
RM = rm.exe -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before $(BIN) all-after
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||
|
||||
main.o: main.c
|
||||
$(CC) -c main.c -o main.o $(CFLAGS)
|
||||
|
||||
test.o: test.c
|
||||
$(CC) -c test.c -o test.o $(CFLAGS)
|
||||
|
||||
record.o: record.c
|
||||
$(CC) -c record.c -o record.o $(CFLAGS)
|
||||
|
||||
load.o: load.c
|
||||
$(CC) -c load.c -o load.o $(CFLAGS)
|
||||
|
||||
../pupil_test/save.o: ../pupil_test/save.c
|
||||
$(CC) -c ../pupil_test/save.c -o ../pupil_test/save.o $(CFLAGS)
|
||||
|
||||
setting.o: setting.c
|
||||
$(CC) -c setting.c -o setting.o $(CFLAGS)
|
@ -0,0 +1,21 @@
|
||||
#include"main.h"
|
||||
|
||||
load(int v){
|
||||
|
||||
dif=0;
|
||||
|
||||
FILE *precord=fopen("record.txt","r");
|
||||
|
||||
fscanf(precord,"%d%d%d",&range,&kind,&voice);
|
||||
|
||||
if(range==1) dif+=2;
|
||||
if(kind==1) dif++;
|
||||
|
||||
for(int i=0;i<4;i++){
|
||||
for(int j=0;j<10;j++){
|
||||
fscanf(precord,"%s%d%f",&dates[i][j].name,&dates[i][j].scores,&dates[i][j].time);
|
||||
}
|
||||
}
|
||||
fclose(precord);
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
#include"main.h"
|
||||
|
||||
int range,kind,voice,dif;
|
||||
date dates[4][11];
|
||||
|
||||
|
||||
int main(void){
|
||||
|
||||
char choice;
|
||||
srand(time(NULL));
|
||||
|
||||
load(1);
|
||||
|
||||
do{
|
||||
|
||||
printf("\n\n\n\n\n\n\t\t\t欢迎使用小学生测验\n\n");
|
||||
printf("\t\t\t1.开始测验\n\n");
|
||||
printf("\t\t\t2.排名\n\n");
|
||||
printf("\t\t\t3.设置\n\n");
|
||||
printf("\t\t\t4.退出\n\n");
|
||||
printf("\t\t\t(输入选项前数字进行相应的操作)\n\n\t\t\t");
|
||||
|
||||
do{ //选择判断
|
||||
|
||||
choice=getch(); if(voice==1) printf("\a");
|
||||
|
||||
|
||||
if(choice>='1'&&choice<='4'){
|
||||
|
||||
system("cls");
|
||||
|
||||
if(choice=='1') test(1);
|
||||
if(choice=='2') record(1);
|
||||
if(choice=='3') setting(1);
|
||||
break;
|
||||
|
||||
}else printf("\n\t\t\t输入错误\n\n\t\t\t");
|
||||
|
||||
}while(choice!='4');
|
||||
|
||||
}while(choice!='4');
|
||||
|
||||
save(1);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
#include<windows.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
#include<stdio.h>
|
||||
#include<time.h>
|
||||
|
||||
typedef struct date{
|
||||
char name[11];
|
||||
int scores;
|
||||
float time;
|
||||
}date;
|
||||
|
||||
extern int range,kind,voice,dif;
|
||||
extern date dates[4][11];
|
||||
|
||||
test(int v);
|
||||
record(int v);
|
||||
load(int v);
|
||||
save(int v);
|
@ -0,0 +1,20 @@
|
||||
#include"main.h"
|
||||
|
||||
record(int v){
|
||||
|
||||
if(range==0) printf("\n\t\t\t\t100以内");
|
||||
else printf("\n\t\t\t\t1000以内");
|
||||
if(kind==0) printf("加减法\n\n");
|
||||
else printf("乘除法\n\n");
|
||||
|
||||
printf("\t\t\t排名 名字 成绩 时间\n\n");
|
||||
|
||||
for(int i=0;i<10;i++){
|
||||
printf("\t\t\t%2d. %-5s %3d分 %5.2f秒\n\n",i+1,dates[dif][i].name,dates[dif][i].scores,dates[dif][i].time);
|
||||
}
|
||||
|
||||
printf("\t\t\t按任意键返回菜单");
|
||||
getch(); if(voice==1) printf("\a");
|
||||
system("cls");
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
0 0 0
|
||||
쭈니 100 57.33
|
||||
쭈니 60 40.73
|
||||
쭈니 10 10.45
|
||||
crf 10 13.91
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
||||
0 0 0.00
|
@ -0,0 +1,15 @@
|
||||
#include"main.h"
|
||||
|
||||
save(int v){
|
||||
|
||||
FILE *precord=fopen("record.txt","w");
|
||||
|
||||
fprintf(precord,"%d %d %d\n",range,kind,voice);
|
||||
for(int i=0;i<4;i++){
|
||||
for(int j=0;j<10;j++){
|
||||
fprintf(precord,"%s %d %.2f\n",dates[i][j].name,dates[i][j].scores,dates[i][j].time);
|
||||
}
|
||||
}
|
||||
fclose(precord);
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
#include"main.h"
|
||||
|
||||
void setting(int v){
|
||||
|
||||
char choice;
|
||||
|
||||
do{
|
||||
|
||||
printf("\n\n\n\n\n\n\t\t\t\t设置\n\n");
|
||||
printf("\t\t\t1.范围····> ");
|
||||
if(range==0) printf("100以内\n\n");
|
||||
else printf("1000以内\n\n");
|
||||
printf("\t\t\t2.运算符···> ");
|
||||
if(kind==0) printf("加减\n\n");
|
||||
else printf("乘除\n\n");
|
||||
printf("\t\t\t3.声音····> ");
|
||||
if(voice==0) printf("关\n\n");
|
||||
else printf("开\n\n");
|
||||
printf("\t\t\t4.返回菜单\n\n");
|
||||
|
||||
do{ //选择判断
|
||||
|
||||
choice=getch();
|
||||
|
||||
if(choice>='1'&&choice<='4'){
|
||||
|
||||
if(choice=='1'){
|
||||
|
||||
range++;
|
||||
range%=2;
|
||||
|
||||
}
|
||||
|
||||
if(choice=='2'){
|
||||
|
||||
kind++;
|
||||
kind%=2;
|
||||
|
||||
}
|
||||
|
||||
if(choice=='3'){
|
||||
|
||||
voice++;
|
||||
voice%=2;
|
||||
|
||||
}
|
||||
|
||||
if(voice==1) printf("\a");
|
||||
break;
|
||||
|
||||
}else printf("\n\t\t\t输入错误\n\n\t\t\t");
|
||||
|
||||
}while(choice!='4');
|
||||
|
||||
system("cls");
|
||||
|
||||
}while(choice!='4');
|
||||
|
||||
dif=0;
|
||||
if(range==1) dif+=2;
|
||||
if(kind==1) dif++;
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
[Project]
|
||||
FileName=СѧÉú²âÑé.dev
|
||||
Name=СѧÉú²âÑé
|
||||
Type=1
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
Linker=
|
||||
IsCpp=0
|
||||
Icon=
|
||||
ExeOutput=
|
||||
ObjectOutput=
|
||||
LogOutput=
|
||||
LogOutputEnabled=0
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=
|
||||
HostApplication=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
CommandLine=
|
||||
Folders=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000000
|
||||
UnitCount=7
|
||||
|
||||
[VersionInfo]
|
||||
Major=1
|
||||
Minor=0
|
||||
Release=0
|
||||
Build=0
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
SyncProduct=1
|
||||
|
||||
[Unit1]
|
||||
FileName=main.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit2]
|
||||
FileName=test.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=main.h
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit4]
|
||||
FileName=record.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=load.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit6]
|
||||
FileName=save.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit7]
|
||||
FileName=setting.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
@ -0,0 +1,38 @@
|
||||
[Editors]
|
||||
Order=0,1,3,4,5,6,2
|
||||
Focused=2
|
||||
[Editor_0]
|
||||
CursorCol=4
|
||||
CursorRow=38
|
||||
TopLine=5
|
||||
LeftChar=1
|
||||
[Editor_1]
|
||||
CursorCol=24
|
||||
CursorRow=124
|
||||
TopLine=154
|
||||
LeftChar=1
|
||||
[Editor_2]
|
||||
CursorCol=13
|
||||
CursorRow=10
|
||||
TopLine=1
|
||||
LeftChar=1
|
||||
[Editor_3]
|
||||
CursorCol=2
|
||||
CursorRow=9
|
||||
TopLine=1
|
||||
LeftChar=1
|
||||
[Editor_4]
|
||||
CursorCol=2
|
||||
CursorRow=8
|
||||
TopLine=1
|
||||
LeftChar=1
|
||||
[Editor_5]
|
||||
CursorCol=2
|
||||
CursorRow=15
|
||||
TopLine=1
|
||||
LeftChar=1
|
||||
[Editor_6]
|
||||
CursorCol=8
|
||||
CursorRow=59
|
||||
TopLine=1
|
||||
LeftChar=1
|
Loading…
Reference in new issue