#include <conio.h>#include <iostream>#include <locale.h>using namespace std;int Sum_sot(int t){ int a[3]; a[2]=t/100; //получаем сотни t%=100; //вычитаем сотни a[1]=t/10; t%=10; a[0]=t/1; return a[2]+a[0];}int Sum_des(int t){ int a[3]; a[2]=t/100; //получаем сотни t%=100; //вычитаем сотни a[1]=t/10; t%=10; a[0]=t/1; a[1]=0; return a[1];}int Sum_ed(int t){ int a[3]; a[2]=t/100; t%=100; a[1]=t/10; t%=10; a[0]=t/1; return a[0];}int main(){ setlocale(0,\"\"); int t; cout<<\"Введите трехзначное число\\"; cin>>t; if(t>999)t=999; //проверка на выход за трехзначное число if(t<100)t=111; cout<<\"\Исходное число \"<<t; cout<<\"\Измененное \"<<Sum_sot(t)<<Sum_des(t)<<Sum_ed(t)<<endl;}