commit d6d1f938181cb987c0a1a1114f06b72c8a98148c Author: unknown Date: Thu Jan 10 16:49:56 2019 +0800 first commit diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..f5eea55 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,28 @@ +# Project: Pupil test +# Makefile created by Dev-C++ 5.11 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +OBJ = main.o +LINKOBJ = main.o +LIBS = -L"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -m32 +INCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" +CXXINCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++" +BIN = "Pupil test.exe" +CXXFLAGS = $(CXXINCS) -m32 +CFLAGS = $(INCS) -m32 +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) diff --git a/Pupil test.dev b/Pupil test.dev new file mode 100644 index 0000000..bad9ccf --- /dev/null +++ b/Pupil test.dev @@ -0,0 +1,51 @@ +[Project] +FileName=Pupil test.dev +Name=Pupil test +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=3 +CompilerSettings=0000000100000000000000000 + +[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 + diff --git a/Pupil test.exe b/Pupil test.exe new file mode 100644 index 0000000..af1b86d Binary files /dev/null and b/Pupil test.exe differ diff --git a/Pupil test.layout b/Pupil test.layout new file mode 100644 index 0000000..e71f27d --- /dev/null +++ b/Pupil test.layout @@ -0,0 +1,8 @@ +[Editors] +Order=0 +Focused=0 +[Editor_0] +CursorCol=34 +CursorRow=62 +TopLine=44 +LeftChar=1 diff --git a/main.c b/main.c new file mode 100644 index 0000000..8c81746 --- /dev/null +++ b/main.c @@ -0,0 +1,69 @@ +#include +#include +#include +#include + +void main() +{ + int num=0,add=0; /* 答题数,总分 */ + int score[3]={10,7,5};/*得几分*/ + char str[20],str1[10][20]; + + while(1) + { + int a=0,b=0,d=0,c=0,k=0,i=0,j=-1,result; + char sf[2]={'+','-'};/* 符号 */ + while(1) + { + a=rand()%51;/*0-50的随机数*/ + b=rand()%51;/*0-50的随机数*/ + d=rand()%2;/* 随机符号 */ + if(d==0)c=a+b; + else c=a-b; + if(c>=0 && c<=50)/* 如果相同重新出题 */ + { + sprintf(str,"%d %c %d = \n",a,sf[d],b); + strcpy(str1[num],str); + if(num==0) break; + j=-1; + for(i=0; i=90)printf("\nSMART\n"); + else if(add>=80)printf("\nGOOD\n"); + else if(add>=70)printf("\nOK\n"); + else if(add>=60)printf("\nPASS\n"); + else printf("\nTRY AGAIN\n"); +getch(); +} + diff --git a/main.o b/main.o new file mode 100644 index 0000000..37ce6cd Binary files /dev/null and b/main.o differ