// Copyright (c) 2014软件技术1班
// All rights reserved.
// 作 者:A02
// 完成日期:2014年 11 月 26 日
// 版 本 号:v1.0
//
// 问题描述:创建一个简单的人品计算器
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string Name;
int score = 0;
Console.Write("请输入名字:");
Name = Convert.ToString(Console.ReadLine());
foreach (char item in Name)
{
score += (int)item;
}
score = score % 100;
Console.WriteLine("得分:{0}", score);
Console.Write("评价:");
if (score >= 0 && score < 20) Console.WriteLine("ROLL点不过10的渣渣");
else if (score >= 20 && score < 40) Console.WriteLine("你肯定经常黑装备吧");
else if (score >= 40 && score < 60) Console.WriteLine("你也就只能默默的当个打工仔了");
else if (score >= 60 && score < 80) Console.WriteLine("G团小红手");
else if (score >= 80 && score < 100) Console.WriteLine("超级红手让我膜拜你吧");
Console.Read();
}
}
}
输出
总结:
1:通过本作业我学会了如何查看unicode编码
2:解决了如何使用unicode编码的问题,收获了经验,增长了自信