https://www.acmicpc.net/problem/10952 : A + B - 5
#include <iostream>
using namespace std;
int main(void){
int a, b;
while(true){
cin >> a >> b;
if(a==0 && b==0)
break;
cout << a + b << endl;
}
}
https://www.acmicpc.net/problem/10951 : A + B - 4
#include <iostream>
using namespace std;
int main(void){
int a, b;
while(cin >> a >> b)
cout << a + b << endl;
}
https://www.acmicpc.net/problem/1110 : 더하기 사이클
#include <iostream>
using namespace std;
int main(void){
int n, n1, count = 0;
cin >> n;
n1 = n;
while(true){
if(n == n1 && count != 0)
break;
n1 = (n1%10)*10+((int(n1/10)+(n1%10))%10);
count += 1;
}
cout << count << endl;
}