https://www.acmicpc.net/problem/1330 : ๋ ์ ๋น๊ตํ๊ธฐ
c++
๋ซ๊ธฐ#include <iostream>
using namespace std;
int main(void){
โโโโint a, b;
โโโโcin >> a >> b;
โโโโif(a > b){
โโโโโโโโcout << ">" << endl;
โโโโ} else if (a < b){
โโโโโโโโcout << "<" << endl;
โโโโ}else{
โโโโโโโโcout << "==" << endl;
โโโโ}
โโโโ
}
https://www.acmicpc.net/problem/9498 : ์ํ ์ฑ์
c++
๋ซ๊ธฐ#include <iostream>
using namespace std;
int main(void){
โโโโint score;
โโโโcin >> score;
โโโโif(score >= 90) cout << "A" << endl;
โโโโelse if(score >= 80) cout << "B" << endl;
โโโโelse if(score >= 70) cout << "C" << endl;
โโโโelse if(score >= 60) cout << "D" << endl;
โโโโelse cout << "F" << endl;
}
https://www.acmicpc.net/problem/2753 : ์ค๋
c++
๋ซ๊ธฐ#include <iostream>
using namespace std;
int main(void){
โโโโint year;
โโโโcin >> year;
โโโโif((year%4==0 && year%100!=0) || year%400==0 ) cout << 1 << endl;
โโโโelse cout << 0 << endl;
}
https://www.acmicpc.net/problem/14681 : ์ฌ๋ถ๋ฉด ๊ณ ๋ฅด๊ธฐ
c++
๋ซ๊ธฐ#include <iostream>
using namespace std;
int main(void){
โโโโint x, y;
โโโโcin >> x >> y;
โโโโif(x>0 && y >0) cout << 1 << endl;
โโโโelse if(x>0 && y<0) cout << 4 << endl;
โโโโelse if(x<0 && y>0) cout << 2 << endl;
โโโโelse if(x<0 && y<0) cout << 3 << endl;
}
https://www.acmicpc.net/problem/2884 : ์๋ ์๊ณ
c++
๋ซ๊ธฐ#include <iostream>
using namespace std;
int main(void){
โโโโint h, m;
โโโโcin >> h >> m;
โโโโm -= 45;
โโโโif(m < 0) h -= 1, m += 60;
โโโโif(h < 0) h =23;
โโโโcout << h << " " << m << endl;
}