#編碼
? ? ? ? ? ? Console.WriteLine("請輸入蘇小鬼語文成績:");
? ? ? ? ? ? string chinese = Console.ReadLine(); ? ? ? //輸入成績
? ? ? ? ? ? int chi = Convert.ToInt32(chinese); ? ? //類型轉(zhuǎn)換
? ? ? ? ? ? Console.WriteLine("請輸入蘇小鬼數(shù)學(xué)成績:");
? ? ? ? ? ? string math = Console.ReadLine(); ? ? ???//輸入成績
? ? ? ? ? ? int ma = Convert.ToInt32(math); ? ? ??//類型轉(zhuǎn)換
? ? ? ? ? ? bool b = chi > 90 || ma > 90; ? ? ?//判斷是否
? ? ? ? ? ? Console.WriteLine("是否正確:{0}",b);
? ? ? ? ? ? Console.ReadKey();
#效果

圖片發(fā)自簡書App