Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: indy
Problemset: เลขหลักของผลคูณ
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-30 15:09:28
#include <iostream>
#include <string>
using namespace std;
int main() {
int a,b,sum,x,length;
string sum_str;
cout<<"A = "; cin>>a;
cout<<"B = "; cin>>b;
cout<<"x = "; cin>>x;
sum = a*b;
sum_str = to_string(sum);
length = to_string(sum).length();
if (x<length){
cout<<sum_str[x-1];
}else{
cout<<"_";
}
}