Generation

generate functionTue, 28 Mar 2023

En I contamos los numeros que quedan por sumar. En S calculamos la suma. A se emplea para leer temporalmente cada numero.

int suma (int a, int b) { int S = 0; int I = 0; while (I < b) { I = I + 1; S = S + a; } return S; }

Want to kickstart your project?Use the new AI Studio to create your code