์ƒˆ์†Œ์‹

๐Ÿงฎ PS

์ฝ”๋“œ์—… (Code up) 1063 ~ 1064 (์‚ผํ•ญ์—ฐ์‚ฐ) [ C++, CPP ]

  • -

๋ฌธ์ œ๋งํฌ : https://codeup.kr/problemsetsol.php?psid=23

 

๋ฌธ์ œ์ง‘ / ๊ธฐ์ดˆ 100์ œ

 

codeup.kr

 

   *์‚ผํ•ญ์—ฐ์‚ฐ์ž

    ex ) x==10 ? value1 : value0; 

      ๋ณ€์ˆ˜(์ฐธ๊ฑฐ์ง“์„ ํŒ๋‹จํ• ), ๋˜๋Š” ์กฐ๊ฑด์‹ ? ์ฐธ์ผ๋•Œ ์‚ฌ์šฉ๊ฐ’ : ๊ฑฐ์ง“์ผ๋•Œ ์‚ฌ์šฉ๊ฐ’;

 

 

*1063๋ฒˆ

#include <iostream>
using namespace std ;
int main(){
    int a,b;
    cin >> a >> b;
    cout << (a<b ? b : a) ;
}

 

 

 

*1064๋ฒˆ

 

#include <iostream>
using namespace std;
int main(){
    int a, b , c;
    cin >> a >> b >> c;
    cout <<( a<b ? (a<c?a:c) : (b<c?b:c)) ;
}
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.