Monday, March 13, 2017

Write a Qbasic Program to generate 0.1, 0.22, 0.333, 0.4444, 0.55555

Write a Qbasic Program to generate 0.1, 0.22, 0.333, 0.4444, 0.55555


CLS
B = 10
FOR I = 1 TO 5
A = A + 10 ^ (I - 1)
PRINT (I * A) / B
B=B*10
NEXT I
END

 

No comments:

Post a Comment