家里電腦如何做網(wǎng)站競(jìng)價(jià)推廣賬戶競(jìng)價(jià)托管費(fèi)用
任務(wù)描述
本關(guān)任務(wù):編寫一個(gè)程序,實(shí)現(xiàn)從鍵盤輸入的三個(gè)整數(shù),輸出三個(gè)整數(shù)的最大值。
編程要求
根據(jù)提示,在右側(cè)編輯器補(bǔ)充代碼,計(jì)算并輸出從鍵盤輸入的三個(gè)數(shù)的最大值。
測(cè)試說明
平臺(tái)會(huì)對(duì)你編寫的代碼進(jìn)行測(cè)試:
測(cè)試輸入:
4
91
7
預(yù)期輸出:
最大值:91
測(cè)試輸入:
151
100
75
預(yù)期輸出:
最大值:151
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ch403
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? /******begin*******/
? ? ? ? ? ? int a = int.Parse(Console.ReadLine());
? ? ? ? ? ? int b = int.Parse(Console.ReadLine());
? ? ? ? ? ? int c = int.Parse(Console.ReadLine());
? ? ? ? ? ? if(b>a){
? ? ? ? ? ? ? ? int max = b;
? ? ? ? ? ? ? ? ? ? ? b = a;
? ? ? ? ? ? ? ? ? ? ? a = max;
? ? ? ? ? ? }
? ? ? ? ? ? if(b>c){
? ? ? ? ? ? int max = b;
? ? ? ? ? ? ? ? ? ? ? b = c;
? ? ? ? ? ? ? ? ? ? ? c = max;
? ? ? ? ? ? }
? ? ? ? ? ? if(a>c){
? ? ? ? ? ? int max = a;
? ? ? ? ? ? ? ? ? ? ? a = c;
? ? ? ? ? ? ? ? ? ? ? c = max;
? ? ? ? ? ? }
? ? ? ? ? ? ? ?Console.WriteLine("最大值:{0}",+c); ? ? ? ? ?
?
? ? ? ? ? ?
? ? ? ? ? ? /*******end********/
? ? ? ? }
? ? }
}