zoukankan      html  css  js  c++  java
  • 烧开水循环

    namespace 烧开水循环跳转
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Clear();
                while (true)
                {
                   
                    string x;
                   
                   
                    Console.WriteLine("请问您是否要烧开水(Y/N)");
                    x = Console.ReadLine();
                    if (x == "Y")
                    {
                        for (int i = 1; i <= 100; i++)
                        {
                           
                            Console.WriteLine("当前温度为"+i+"℃");
                               
                          
                           if (i == 30)
                            {
                                Console.WriteLine(i + "℃" + "水温了");
                            }
                          
                            else if (i == 50)
                            {
                                Console.WriteLine(i + "℃" + "水热了");
                            }
                          
                            else if (i == 80)
                            {
                                Console.WriteLine(i + "℃" + "水快开了");
                            }
                           
                            else if (i == 100)
                            {
                                Console.WriteLine(i + "℃" + "水开了");
                             
                            }

                          
                      }

                    }
                    else if (x == "N")
                    {
                        Console.WriteLine("不喝水,渴死你丫的!");
                    }
                    else
                    {
                        Console.WriteLine("有病吧你!!");
                    }

                    Console.ReadLine();
                }
            }
        }
    }

  • 相关阅读:
    [LeetCode] 714. Best Time to Buy and Sell Stock with Transaction Fee
    [LeetCode] 309. Best Time to Buy and Sell Stock with Cooldown
    [LeetCode] 1291. Sequential Digits
    [LeetCode] 188. Best Time to Buy and Sell Stock IV
    [LeetCode] 123. Best Time to Buy and Sell Stock III
    [LeetCode] 581. Shortest Unsorted Continuous Subarray
    [LeetCode] 1041. Robot Bounded In Circle
    [LeetCode] 1110. Delete Nodes And Return Forest
    [LeetCode] 421. Maximum XOR of Two Numbers in an Array
    [LeetCode] 1109. Corporate Flight Bookings
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4381761.html
Copyright © 2011-2022 走看看