




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
using System;using System.Collections.Generic;using System.Text;using System.Drawing;using System.IO;using System.Media;namespace ConsoleApplication4 class Program static void Main(string args) bool tips =true; int, intTable = new int9, 18; for (int i = 0; i 9; i+) for (int k = 0; k 0) x -= 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.DownArrow: case ConsoleKey.S: if (x 1) y -= 2; Console.SetCursorPosition(y, x); break; case ConsoleKey.RightArrow: case ConsoleKey.D: if (y 16) y += 2; Console.SetCursorPosition(y, x); break; case ConsoleKey.D1: Console.Write(); intTablex, y = 1; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D2: Console.Write(); intTablex, y = 2; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D3: Console.Write(); intTablex, y = 3; intTablex, y + 1 = 1;/需要加1 横着要站2个字符的位置 01 23 45 67 89 1011 1213 1415 1617 0 2 4 6 8 10 12 14 16 Console.SetCursorPosition(y, x); break; case ConsoleKey.D4: Console.Write(); intTablex, y = 4; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D5: Console.Write(); intTablex, y = 5; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D6: Console.Write(); intTablex, y = 6; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D7: Console.Write(); intTablex, y = 7; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D8: Console.Write(); intTablex, y = 8; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; case ConsoleKey.D9: Console.Write(); intTablex, y = 9; intTablex, y + 1 = 1; Console.SetCursorPosition(y, x); break; default: break; for (int i = 0; i 9; i+) for (int k = 0; k 18; k+) if (intTablei, k != 0) z+; if (z = 162) for (int x1 = 0; x1 9; x1+) int count = 0; /计数 for (int y1 = 0; y1 18;y1+=2) Eachcount = intTablex1, y1; count+; Array.Sort(Each); for (int i1 = 0; i1 9; i1+) if (Eachi1 = i1 + 1) num+; if (num != 9) tips = false; break; num = 0; if (tips!=false) for (int y1 = 0; y1 18; y1+) for (int x1 = 0; x1 9; x1+) Eachx1 = intTablex1, y1; Array.Sort(Each); for (int i1 = 0; i1 9; i1+) if (Eachi1 = i1 + 1) num+; if (num != 9) tips = false; break; y1+; num = 0; /判断每一行是否是1-9 if (tips!=false) int xx = 0; /行 int yy = 0;/列 int xxmax = 3;/行的范围 int yymax = 6;/列的范围 if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 0; xxmax = 3; yy = 6; yymax = 12; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 0; xxmax = 3; yy = 12; yymax = 18; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 3; xxmax = 6; yy = 0; yymax = 6; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 3; xxmax = 6; yy = 6; yymax = 12; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 3; xxmax = 6; yy = 12; yymax = 18; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 6; xxmax = 9; yy = 0; yymax = 6; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 6; xxmax = 9; yy = 6; yymax = 12; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) xx = 6; xxmax = 9; yy = 12; yymax = 18; if (choose(Each, intTable, xx, yy, xxmax, yymax) = true) Console.Clear(); Console.SetCursorPosition(15, 35); Console.WriteLine(GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGOOD); private static void stamp(ref int, intTable, byte condition) foreach (char item in condition) int midd; /该坐标的值 int x_; /行 int y_; string num_;/列 /输出的字符 x_ = int.Parse(item.ToString(); y_ = int.Parse(item.ToString(); midd = int.Parse(item.ToString(); num_ = middIn(midd); x_y_(ref intTable, midd, x_, y_, num_); private static string middIn(int midd) string num_=; switch (midd) case 1: num_ = ; break; case 2: num_ = ; break; case 3: num_ = ; break; case 4: num_ = ; break; case 5: num_ = ; break; case 6: num_ = ; break; case 7: num_ = ; break; case 8: num_ = ; break; case 9: num_ = ; break; default: break; return num_; private static void xy(ref int, intTable) int midd = 9; /该坐标的值 int x_ = 0; /行 int y_ = 8; /列 string num_ = ; /输出的字符 x_y_(ref intTable, midd, x_, y_, num_); x_ = 0; y_ = 12; midd = 4; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 0; y_ = 16; midd = 1; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第一行 x_ = 1; y_ = 0; midd = 3; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 1; y_ = 2; midd = 9; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 1; y_ = 6; midd = 7; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 1; y_ = 10; midd = 1; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第二行 x_ = 2; y_ = 0; midd = 8; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 2; y_ = 14; midd = 9; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第三行 x_ = 3; y_ = 6; midd = 2; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 3; y_ = 8; midd = 1; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 3; y_ = 14; midd = 4; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 3; y_ = 16; midd = 5; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第四行 x_ = 4; y_ = 0; midd = 5; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 4; y_ = 14; midd = 8; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第5行 x_ = 5; y_ = 0; midd = 9; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 5; y_ = 2; midd = 3; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 5; y_ = 14; midd = 1; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第6行 x_ = 6; y_ = 8; midd = 2; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 6; y_ = 10; midd = 9; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 6; y_ = 12; midd = 8; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第7行 x_ = 7; y_ = 6; midd = 1; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 7; y_ = 10; midd = 6; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); x_ = 7; y_ = 16; midd = 3; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); /第8行 x_ = 8; y_ = 0; midd = 4; num_ = ; x_y_(ref intTable, midd, x_, y_, num_); private static void x_
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年新能源企业绿色品牌建设与市场竞争力报告
- 2025年新能源行业工业互联网设备预测性维护技术报告
- 某县亲商爱商优化投资环境典型经验材料
- 跨行业培训需求调研问卷模板
- 民生银行深圳市龙华区2025秋招笔试热点题型专练及答案
- 2025年山东管理学院高层次人才招聘笔试高频难、易错点备考题库及答案详解1套
- 兴业银行乐山市峨眉山市2025秋招面试典型题目及参考答案
- 平安银行合肥市肥东县2025秋招笔试英文行测高频题含答案
- 2023年度工程硕士常考点试卷(完整版)附答案详解
- 2024年海船船员考试能力提升B卷题库及答案详解【名校卷】
- 教师的校本研修课件
- 三垦变频器说明书
- XX旅行社企业介绍模板
- 冲压质量培训
- 2025年辽宁交投集团招聘笔试参考题库含答案解析
- 设备维护与保养手册
- 喷雾干燥塔操作规程模版(3篇)
- 《天疱疮诊断及治疗》课件
- 学校教代会代表换届选举方案
- 现代交换原理第二章
- 2024版工业润滑油销售协议范例版
评论
0/150
提交评论