I made the following program that says the age of the person and the number she thought, but the final result generates a number of 4 figures according to the calculations below suppose I thought of the number 12:
Multiply by 2: 12 * 2 = 24
add 5: 24 + 5 = 29
Multiply by 50: 29 * 50 = 1450
std::cout<<"Digite o rsultado: 1450";
std::cin>>result=1450;
int var1(2017-250);
int var2(1450+1767);
std::cout<<"\n\tDigite seu ano de nascimento: ";
std::cin>>anonasc;
int var3(3217-1994);
The result contained in var3 would be 1223 where 12 would be the number I had thought of and 23 my age, but do you have any way to separate this result so that it shows separately the number and age of the person? >
I know if I do:
var3=1223/100;
It returns me
var3=12
But how about I get the number 23 like I do?