July 05, 2013

Java program to convert Rupee To Paisa

Write a Java program to convert Rupee TO Paisa 


Rupee TO Paisa

import java.io.*;
class rtop
{
    public static void main(String args[])throws IOException
    {
        BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter the rupees to convert: ");
       //rs->rupees
        int rs=Integer.parseInt(stdin.readLine());
        //pa->paisa
        double pa=rs*100;
        System.out.println("The paise is "+pa+" paise");
    }
}


OUTPUT


C:\Program Files\Java\jdk1.5.0\bin>java rtop

Enter the rupees to convert:
1
The paise is 100.0 paise


No comments:
Write comments