标题: 这段代码当用户输出时,怎么让它重新输入啊 [打印本页] 作者: 邢秀兰 时间: 2012-11-13 21:15 标题: 这段代码当用户输出时,怎么让它重新输入啊 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace flag4
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入李四的评审等级A-E");
string input = Console.ReadLine();
decimal salary = 5000;
bool flag = false;
switch (input)
{
case "A":
salary += 500;
break;
case "B":
salary+= 200;
break;
case "C":
salary = 5000;
break;
case "D":
salary -= 200;
break;
case "E":
salary -= 500;
break;
default:
{
Console.WriteLine("你输入的有问题");