比较两个数的大小

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 数字大小比较
{
class Program
{
static void Main(string[] args)
{
Console.Write("请输入第一个数字:");
string a = Console.ReadLine();
int c = Convert.ToInt32(a);
Console.Write("请输入第二个数字:");
string b = Console.ReadLine();
int d = Convert.ToInt32(b );
int int_q;
int_q = (c > d) ? c : d;
Console.WriteLine("两个数字中最大的数字为:{0}", int_q);
Console.ReadLine();
}
}
}

posted @ 2015-10-16 22:10  薯条哥哥  阅读(168)  评论(0编辑  收藏  举报