convert.toint32();把输入的字符转成整数类型
convert.tochar();把输入的字符转成字符类型
convert.toint32();把输入的字符转成整数类型
convert.tochar();把输入的字符转成字符类型
using System;
namespace _014_编程题
{
class Program
{
static void Main(string[] args)
{
//int year = Convert.ToInt32(Console.ReadLine());
//if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
//{
// Console.WriteLine("是闰年");
//}
//else
//{
// Console.WriteLine("不是闰年");
//}
//int number = Convert.ToInt32(Console.ReadLine());
//if (number < 0)
//{
// Console.WriteLine(0 - number);
//}
//else
//{
// Console.WriteLine(number);
//}
//int a = Convert.ToInt32(Console.ReadLine());
//int b = Convert.ToInt32(Console.ReadLine());
//int c = Convert.ToInt32(Console.ReadLine());
//int max = a;
//if (b > max)
//{
// max = b;
//}
//if (c > max)
//{
// max = c;
//}
//Console.WriteLine(max * max);
char a = Convert.ToChar(Console.ReadLine());
char b = Convert.ToChar(Console.ReadLine());
if (a > b)
{
Console.WriteLine("{0}>{1}", a, b);
}
else
{
Console.WriteLine("{0}<{1}", a, b);
}
}
}
}
x'x
Convert.ToChar
字符可以直接做大小比较