人品计算器

来源:互联网 发布:cf卡数据恢复软件 mac 编辑:程序博客网 时间:2024/05/22 07:04
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace ConsoleApplication21
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入你的姓名");
            string Name = "";
            Name = Console.ReadLine();








            int score = 0;
            for (int i = 0; i < Name.Length; i++)
            {
                score += (int)Name[i];




            }




            score %= 100;






            string comment = "";
            switch (score / 10)
            {
                case 0:
                case 1: comment = "世界上最笨的人"; break;
                case 2:
                case 3: comment = "离白痴不远了"; break;
                case 4:
                case 5: comment = "正常人"; break;
                case 6:
                case 7: comment = "和爱因斯坦是同一类人"; break;
                case 8:
                case 9: comment = "超越宇宙的最强王者"; break;




            }






            Console.Clear();
            Console.WriteLine("人品评估报告");
            Console.WriteLine("姓名:{0}", Name);
            Console.WriteLine("分值:{0}", score);
            Console.WriteLine("评价:{0}", comment);








            Console.ReadKey(true);
        }
    }
}
0 0