Computer Science, asked by gauridevi01234, 6 months ago

write a qbasic program to reverse a given number

Answers

Answered by mohamedapsal
2

Answer:

  • CLS.

  • INPUT "Enter any digit"; n.

  • WHILE n <> 0.

  • r = n MOD 10.

  • s = s * 10 + r.

  • n = n \ 10.

  • WEND.

  • PRINT "Reversed digits is "; s.

Similar questions