using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kblk
{
class Program
{
static void Main(string[] args)
{
Console.Write("请输入一个四位数的整数:");
string s = Console.ReadLine();
int num = Convert.ToInt32(s);
int[] each = new int[4];
int max, min, i, j, temp;
while (num != 6174 && num != 0)
{
i = 0;
while (num != 0) {
each[i++] = num % 10;
num = num/10;
}
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3 - i; j++)
{
if (each[j] > each[j + 1])
{
temp &#
实验2-2 C#实现卡布列克运算
最新推荐文章于 2024-05-18 10:39:54 发布