#include <iostream>
#include <math.h>
#include <string>
#include <sstream>
using namespace std;
int main() {
string input;
int value,
cout << "Input your number: " << endl;
cin >> input;
const int count = input.length();
istringstream buffer(input);
buffer >> value;
if (count == 4) {
私のプログラムでは、数字の長さを数えた後、数字を符号化すると仮定しています。例えば。 1234は他の数字に変わります。私の質問は、それぞれの数字をどのように取ってそれを使うのかということです。例えば。 (1 + 1)/ 10、または(3 + 2)/ 10を取る。数字の位置を見つけて使用する方法