Using a for loop, print the decimal equivalents of ½, 1/3, ¼, … 1/10. Also, using a while loop, print the decimal equivalents of ½, 1/3, ¼, … 1/10.

Respuesta :

pseudo code here

int i;
for(i=2,i<=10;i++)
{
print 1/i;
}

i = 2;
while (i <= 10)
{
print 1/i;
i++;
}