软件1班人品计算器1.0作业
来源:互联网 发布:定义一个变量sql 编辑:程序博客网 时间:2024/06/06 14:00
// Copyright (c) 2014软件1班 // All rights reserved. // 作者:A04潘保健 // 完成日期:2014年11月27号 // 版 本 号:v1.0 // 问题描述:编写一个程序进行计算名字unicode编码,经过处理得到人品值。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 人品计算器1{ class Program { static void Main(string[] args) { Console.Title = "人品计算机控制台版本1.0"; Console.WriteLine("请输入姓名"); string strName = ""; strName = Console.ReadLine(); int score = 0; foreach (char subName in strName) score += subName; score %= 100; string comment = ""; if (score <= 20) comment = "非人类,无法评价!"; else if (score <= 40) comment = "拜李宇春哥不灵,叫都敏俊xi不应的倒霉蛋"; else if (score <= 60) comment = "掉人堆里都找不出来的普通人……"; else if (score <= 80) comment = "拥有滑板鞋的思想富足者"; else comment = "掌控蓝翔挖掘机技术的宇宙强者"; if (strName.Equals("潘保健")) { score = 101; comment = "NB到自己都怕"; } Console.Clear(); Console.WriteLine("人品评估报告"); Console.WriteLine("姓名:{0}", strName); Console.WriteLine("分值:{0}", score); Console.WriteLine("评价:{0}", comment); Console.ReadKey(true); } }}
输出:
总结:通过此次作业了解到了char的运用。
0 0
- 软件1班人品计算器1.0作业
- 人品计算器作业
- 作业:人品计算器
- 上机作业人品计算器
- 作业人品计算器
- 人品计算器1.0
- 人品计算器1.0版本
- 人品计算器1.0
- 上机作业 人品计算器V1.0
- ~~~~~~~~~~~~~人品计算器~~~~~~~~~~~~~~~~~~~~~~~
- 人品计算器
- 人品计算器
- 人品计算器
- 人品计算器
- 人品计算器
- 人品计算器
- 人品计算器
- 人品计算器
- 001从离职到北京安定
- Python语言入门级使用(一)
- C语言中运用“非”判断一个整数是否能被5整除
- window下ANSI转UTF-8,UTF-8转Unicode的实现
- 苹果WWDC2014大会最新技术分析
- 软件1班人品计算器1.0作业
- [BZOJ 1066] 蜥蜴
- 深入剖析tomcat 第二章
- 002北京的空气好闷
- [BZOJ 1588]营业额统计 && splay部分模版
- 第五章 树和二叉树
- DLL与LIB库文件的生成和使用---C++
- 杭电_人见人爱A^B
- json转换为数组