#include <iostream>
#include <cstring>
using namespace std;
int main(){
string num;
int sum;
cout<<"Input number:"<<endl;
cin>>num;
sum = num[0] - '0' + num.back() - '0';
cout<<"Output number: "<< sum << endl;
return 0;
}
#include <iostream>
#include <cstring>
using namespace std;
int main(){
string num;
int sum;
cout<<"Input number:"<<endl;
cin>>num;
sum = num[0] - '0' + num.back() - '0';
cout<<"Output number: "<< sum << endl;
return 0;
}