Исходный текст программы:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n, n1, n2, n3;
cout << "Vvedite 3-hznachnoe chislo: " << endl;
cin >> n;
if ((n > 99) && (n < 1000))
{
n1 = floor(n / 100);
cout << n1 << " + ";
n2 = floor(n / 10 % 10);
cout << n2 << " + ";
n3 = floor(n / 1 % 10);
cout << n3 << " = ";
cout << n1 + n2 + n3 << endl;
}
cin.get();
return 0;
}