From 325500b4395df115f2e9ce99e791c75877895df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=96=87=E4=BF=8A?= <18408000201@stu.hut.edu.cn> Date: Wed, 9 Jan 2019 12:21:48 +0800 Subject: [PATCH] third commit --- 未命名4.cpp | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 未命名4.cpp diff --git a/未命名4.cpp b/未命名4.cpp new file mode 100644 index 0000000..88d76ae --- /dev/null +++ b/未命名4.cpp @@ -0,0 +1,72 @@ +#include +#include +#include +/**/ +void White(){ +{ system("color e"); + for(int i=0;i<8;i++) + { + for(int j=0;j<8;j++) + { + if((i+j)%2==0) + { + + + printf("%c%c",168,128); + } + else + { + printf(" "); + } + } + printf("\n"); + } +} + } +void Yellow() +{/*ӡ*/ +/*òͼ⣬ascall168128Լո*/ + for(int i=0;i<8;i++) + { + for(int j=0;j<8;j++) + { + if((i+j)%2==0) + { + printf("%c%c",168,128); + } + else + { + printf(" "); + } + } + printf("\n"); + } +} +void Goodbye(){printf("Goodbye!\n");} +/*ʵ*/ + + +int main() +{ +/*˳ص״̬*/ +bool quit=false; +int input; +/*ѭ*/ +while(!quit) +{ +/*ӡ˵*/ +printf("ӭƹ\n"); +printf("ִҪɫ\n") ; +printf("1.Yellow 2.White 3.Goodbye! Input 1-3:"); +/**/ +input=getchar()-0x30,getchar(); +/*ѡ֧*/ +switch(input) +{ +case 1:White();quit=true;break; +case 2:Yellow();quit=true;break; +case 3:Goodbye();quit=true;break; +default:break; +} +} +}