using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication14
{
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 = "";
{
if (score > 0 && score <= 20) comment = "不值得去评价";
else if (score <= 40) comment = "请别放弃治疗";
else if (score <= 60) comment = "掉人堆里都找不出来的普通人……";
else if (score <= 90) comment = "拥有滑板鞋的思想富足者";
else comment = "掌控蓝翔挖掘机技术的宇宙强者";
}
Console.WriteLine("姓名:{0},分数:{1},评价:{2}",name,score,comment);
Console.ReadKey();
}
}
}
通过这次作业,我学会了如何使用数组和Unicode编码。