Write a program to convert rupees to dollar 60 rupees=1 dollar

 

Write a program to convert rupees to dollar 60 rupees=1 dollar

Explanation :

hello friends So Basically you have to write program to convert rupees in to dollarsĀ  (you have to take rupees value from user)

value of 1 dollar in to rupees is given into Question which is 1 dollar = 60 rupees so what you can do is take value of rupees from user and divide it with value of dollar (Ex: Input/60=value in dollar)

after dividing input with 60 you’ll get value dollar in decimals so let’s write program

1 integer variable to store user input 1 floatĀ variable to store value of dollar (result) And you have to use Scanner class to take input from user

Final code is given below if you got any problem comment below.

OUTPUT :


OOPJ practical 1 gtu

Add a Comment

Your email address will not be published. Required fields are marked *