#include <stdio.h>
char *input_1 = "11"; // al posto di argv[1];
char *input_2 = "21"; // al posto di argv[2];
int
somma (int x, int y)
{
int z = x;
int i = 1;
while (i <= y)
{
z++;
i++;
};
return z;
}
int
main (int argc, char *argv[])
{
int x;
int y;
int z;
// Converte le stringhe ottenute dalla riga di comando in
// numeri interi e li assegna alle variabili x e y.
z = somma (x, y);
printf ("%i + %i = %i\n", x
, y
, z
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpjaGFyICppbnB1dF8xID0gIjExIjsgLy8gYWwgcG9zdG8gZGkgYXJndlsxXTsKY2hhciAqaW5wdXRfMiA9ICIyMSI7IC8vIGFsIHBvc3RvIGRpIGFyZ3ZbMl07CgppbnQKc29tbWEgKGludCB4LCBpbnQgeSkKewogICAgaW50IHogPSB4OwogICAgaW50IGkgPSAxOwoKICAgIHdoaWxlIChpIDw9IHkpCiAgICAgIHsKICAgICAgICB6Kys7CiAgICAgICAgaSsrOwogICAgICB9OwoKICAgIHJldHVybiB6Owp9CgppbnQKbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewogICAgaW50IHg7CiAgICBpbnQgeTsKICAgIGludCB6OwoKICAgIC8vIENvbnZlcnRlIGxlIHN0cmluZ2hlIG90dGVudXRlIGRhbGxhIHJpZ2EgZGkgY29tYW5kbyBpbgogICAgLy8gbnVtZXJpIGludGVyaSBlIGxpIGFzc2VnbmEgYWxsZSB2YXJpYWJpbGkgeCBlIHkuCgogICAgc3NjYW5mIChpbnB1dF8xLCAiJWkiLCAmeCk7CiAgICBzc2NhbmYgKGlucHV0XzIsICIlaSIsICZ5KTsKCiAgICB6ID0gc29tbWEgKHgsIHkpOwoKICAgIHByaW50ZiAoIiVpICsgJWkgPSAlaVxuIiwgeCwgeSwgeik7CgogICAgcmV0dXJuIDA7Cn0=