Write a program using while loop