Escolar Documentos
Profissional Documentos
Cultura Documentos
#include <stdio.h>
int main ()
{
int x, i, j;
x = 8;
for (i = 2; i < 5; i++)
{
j= 3;
while (j > 0)
{
x = x+1;
j = j-1;
}
printf( "X : %5d\n", x );
}
printf("- Fim - \n");
return 0;
}
SAIDA:
Ex.: 6 = 1 + 2 + 3 28 = 1 + 2 + 4 + 7 + 14