asked 228k views
5 votes
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.

1 Answer

4 votes
pseudo code here

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

i = 2;
while (i <= 10)
{
print 1/i;
i++;
}
answered
User Buzuosheng
by
8.3k points

Related questions

asked Jul 5, 2024 105k views
Lcoq asked Jul 5, 2024
by Lcoq
7.8k points
2 answers
4 votes
105k views
asked Sep 13, 2024 212k views
Opticod asked Sep 13, 2024
by Opticod
8.8k points
1 answer
0 votes
212k views