#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int x;
int n,g=1;
while(g)/利用g来判断是否继续进行游戏/
{
n=0;/比较次数置零/
for(;😉
{
printf(“符号排列组合帮助:\n【0是2个符号2位数排列组合】\n【1是2个符号3位数排列组合】\n\n\n【2是3个符号2位数排列组合】\n【3是3个符号3位数排列组合】\n【4是数字画图程序】\n\n【5是4个符号2位数排列组合】\n\n【6是5个符号2位数排列组合】\n\n【7是6个符号2位数排列组合】\n\n【8是7个符号2位数排列组合】\n\n\n\n”);
printf(“请输入数字选择\n”);
scanf("%d",&x);
switch(x) {
case 0:char* a[2][2];
printf(“请输入2个符号\n”);
for (int i = 0; i < 2; i++)
scanf("%s", a[i]);
for (int j = 0; j < 2; j++)
for (int k = 0; k < 2; k++)
printf("%s%s\n", a[j],a[k]); break;
case 1:char* b[2][2];
printf(“请输入2个符号\n”);
for (int i = 0; i < 2; i++)
scanf("%s", b[i]);
for (int j = 0; j < 2; j++)
for (int k = 0; k < 2; k++)
for (int l = 0; l < 2; l++)
printf("%s%s%s\n", b[j],b[k],b[l]); break;
case 2:char* c[3][3];
printf(“请输入3个符号\n”);
for (int i = 0; i < 3; i++)
scanf("%s", c[i]);
for (int j = 0; j < 3; j++)
for (int k = 0; k < 3; k++)
printf("%s%s\n", c[j],c[k]); break;
case 3:char* d[3][3];
printf(“请输入3个符号\n”);
for (int i = 0; i < 3; i++)
scanf("%s", d[i]);
for (int j = 0; j < 3; j++)
for (int k = 0; k < 3; k++)
for (int l = 0; l < 3; l++)
printf("%s%s%s\n", d[j],d[k],d[l]); break;
{
case 4:
char z[10];
printf(“请输入数字\n”);
scanf("%s",&z);
for (int i=0;i<10;i++)
switch(z[i]) {
case ‘1’:printf("\033[30;31;6m■红"); break;
case ‘2’:printf("\033[30;32;6m■绿"); break;
case ‘3’:printf("\033[30;33;6m■黄"); break;
case ‘4’:printf("\033[30;34;6m■蓝"); break;
case ‘5’:printf("\033[30;35;6m■紫"); break;
case ‘6’:printf("\033[30;36;6m■青"); break;
case ‘7’:printf("\033[30;38;6m■黑"); break; case ‘0’:printf(" “); break;
case ‘/’:printf(”\n"); break;
}
{
case 5:char* g[4][4];
printf(“请输入4个符号\n”);
for (int i = 0; i < 4; i++)
scanf("%s", g[i]);
for (int j = 0; j < 4; j++)
for (int k = 0; k < 4; k++)
printf("%s%s\n", g[j],g[k]); break;
case 6:char* h[5][5];
printf(“请输入5个符号\n”);
for (int i = 0; i < 5; i++)
scanf("%s", h[i]);
for (int j = 0; j < 5; j++)
for (int k = 0; k < 5; k++)
printf("%s%s\n", h[j],h[k]); break;
case 7:char* m[6][6];
printf(“请输入6个符号\n”);
for (int i = 0; i < 6; i++)
scanf("%s", m[i]);
for (int j = 0; j < 6; j++)
for (int k = 0; k < 6; k++)
printf("%s%s\n", m[j],m[k]); break;
case 8:char* n[7][7];
printf(“请输入7个符号\n”);
for (int i = 0; i < 7; i++)
scanf("%s", n[i]);
for (int j = 0; j < 7; j++)
for (int k = 0; k < 7; k++)
printf("%s%s\n", n[j],n[k]); break;
}
default :printf(“输入错误,请重新输入!”); break;
printf(“Wanna continue想继续吗? 1.continue继续 0.exit退出\n”);
scanf("%d",&g);/选择是否继续/
break;
}
}
}
}
}