#include int main(void){ int mass_arv1[3]; int mass_arv2[3]; int massx[3]={0, 0, 0}; int x; int z; int y; int k; //sisend printf("Progre liidab kuni kahekohalisi arve paberi meetodil\n"); printf("Esimene arv: "); scanf("%d",&x); printf("Teine arv: "); scanf("%d",&z); //arvude purustamine, 10 jääk, liigitamine y = x%10; mass_arv1[0]= y; x=x/10; mass_arv1[1]= x%10; x=x/10; y = z%10; mass_arv2[0]= y; z=z/10; mass_arv2[1]= z%10; z=z/10; y= mass_arv1[0]+mass_arv2[0]; //liigitus if (y>9){ massx[1]=1; y=y-10; } k= mass_arv1[1]+mass_arv2[1]+massx[1]; if (k>9){ massx[2]=1; } //väljastamine, kokkulöömine printf("%d%d\n",massx[2],massx[1]); printf(" %d%d\n",mass_arv1[1],mass_arv1[0]); printf("+\n"); printf(" %d%d\n",mass_arv2[1],mass_arv2[0]); printf("-----\n"); printf("%d%d\n",k,y); // The End system("PAUSE"); return 0; }