zoukankan      html  css  js  c++  java
  • 编写一段程序,运行时向用户提问“你考了多少分?(0~100)”,接受输入后判断其等级并显示出来。判断依据如下:等级={优 (90~100分);良 (80~89分);中 (60~69分);差 (0~59分);}

     编写一段程序,运行时向用户提问“你考了多少分?(0~100)”,接受输入后判断其等级并显示出来。判断依据如下:等级={优 (90~100分);良 (80~89分);中 (60~69分);差 (0~59分);}

     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Text;
     5 using System.Threading.Tasks;
     6 
     7 namespace 贴吧01
     8 {
     9     class Program
    10     {
    11         static void Main(string[] args)
    12         {
    13             int input;
    14             //Console.WriteLine("你考了多少分?(0~100)");
    15             while (true)
    16             {
    17                 Console.WriteLine("你考了多少分?(0~100)");
    18                 input = Convert.ToInt32(Console.ReadLine());
    19                 if ((input >= 90) && (input <= 100))
    20                 {
    21                     Console.WriteLine("");
    22                     break;
    23                 }
    24                 else if (input >= 80)
    25                 {
    26                     Console.WriteLine("");
    27                     break;
    28                 }
    29                 else if ((input >= 60) && (input <= 69))
    30                 {
    31                     Console.WriteLine("");
    32                     break;
    33                 }
    34                 else if ((input >= 0) && (input <= 59)) //0-59
    35                 {
    36                     Console.WriteLine("");
    37                     break;
    38                 }
    39                 else
    40                 {
    41                     Console.WriteLine("输入有误或者所输入的不是要求的有效成绩范围");
    42                 }
    43             }
    44             Console.ReadKey();
    45         }
    46     }
    47 }
  • 相关阅读:
    ISP整体流程介绍
    Demosiac 去马赛克 (CIP)
    ISP-CMOS图像传感器内部结构及工作原理
    数字图像显示原理
    浅析图像到视频
    摄像机gamma校正
    理解 Pix Binning
    人工智能"眼睛"——摄像头
    CMOS 摄像头的Skipping 和 Binning 模式
    android 向服务器发送json数据,以及发送头信息的三种方式
  • 原文地址:https://www.cnblogs.com/start-from-scratch/p/4982568.html
Copyright © 2011-2022 走看看