圈人数数:An interesting way to delete numbers
来源:互联网 发布:网络语吃糠是什么意思 编辑:程序博客网 时间:2024/04/30 21:57
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace choice
{
class Program
{
static void Main(string[] args)
{
int count=0;
int sum = 0;
int[] sort = new int[10];
for (int i = 0; i < 10; i++)
{
sort[i] = i + 1;
}
for (int j = 0; j < 10&&sum<9; j++)
{
if (sort[j] != 0)
{
Console.WriteLine(sort[j]);
count = (count + 1) % 3;
if (count == 0)
{
sort[j] = 0;
sum+=1;
}
}
if (j == 9)
{
j =-1;
}
}
for (int n = 0; n < 10; n++)
{
if (sort[n] != 0)
Console.Write(sort[n]);
Console.WriteLine();
}
Console.ReadKey();
}
}
}
- 圈人数数:An interesting way to delete numbers
- Interesting way to validate number
- The best way to delete code
- Fastest way to build an HTML string
- An Easy Way to Make a Treemap
- Lower case to upper case – An interesting fact
- HDU 3195 Interesting Numbers
- ural 2070 - Interesting Numbers
- UVA2070-Interesting Numbers
- ural2070-Interesting Numbers
- URAL 2070 Interesting Numbers
- Ural 2070 Interesting Numbers
- Interesting Numbers URAL
- An Interesting Set
- Startup an interesting project
- An interesting 404 page
- An Interesting Sequence
- An easy way to change colour in text control
- Windows 平台上长路径名文件的解决方法
- MySQL注意事项(字符连接,IN)
- SOS调试
- 枚举
- (转)asp.net中的报销多级审批工作流
- 圈人数数:An interesting way to delete numbers
- linux下的Select函数(一)
- ibatis的主键生成方式
- Linux select函数(二)
- 在STL 中 vector 和 list 的比较
- bing之初体验
- (WPF学习记录)第十二章 自定义面板
- linux pid
- C#中的委托