티스토리 뷰

728x90

10952

#include <iostream>
using namespace std;

int main(){
    int a,b;
    while(1){
        cin >> a >> b;
        if( a != 0 && b != 0) cout << a+b << endl;
        else break;
    }
    return 0;
}

10953

#include <iostream>
using namespace std;

int main(){
    int caseNum;
    int a,b;
    char comma;
    
    cin >> caseNum;
    for(int i=0;i<caseNum;i++){
        cin >> a >> comma >> b;
        cout << a+b << endl;
    }
    return 0;
}

11021

#include <iostream>
using namespace std;

int main(){
    int caseNum,a,b;
    cin >> caseNum;
    for(int i=0;i<caseNum;i++){
        cin >> a >> b;
        cout << "Case #"<<i+1<<": "<< a+b << endl;
    }
    return 0;
}

11718

#include <iostream>
using namespace std;

int main(){
    string str;
    while(1){
        getline(cin,str);
        if(!cin.eof()) cout << str << endl;
        else break;
    }
    return 0;
}

11721

#include <iostream>
using namespace std;

int main(){
    string str;
    int j=0;

    getline(cin,str);
    for(int i=0;i<str.length();i++){
        cout << str[i];
        if((i+1)%10 == 0) cout << endl;
    }
    return 0;
}
728x90

'C++ > Baekjoon' 카테고리의 다른 글

백준 8393, 10818  (0) 2022.02.09
백준 1924  (0) 2022.02.09
백준 10951  (0) 2022.02.08
백준 2558, 10950  (0) 2022.02.08
백준1152  (0) 2022.02.04
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함