Problem è Print the series .3, .33, .333, .3333

 

Answer è       

/* wap to print the series .3,.33,.333,.3333*/

#include <stdio.h>

main ( )

{

float a,c;

int b=10,i=0;

clrscr( );

c = 3;

while (i<4)

{

a=c/b;

b=b*10;

printf ("\n%.4f", a);

c = (c * 10) + 3;

i++;

}

getch ( );

return 0;

}