currency

currency

View Answers

August 13, 2008 at 12:52 PM

hai friend.....
This is a simple method....
change according to the rate....

import java.io.*;
class Currency
{
public static void main(String args[]) throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int ch=0;
float val;
System.out.println("Enter The Option for Currency");
System.out.println("1. DOLLAR \n 2.SWISS \n 3.EURO \n 4.MEXICAN");
ch=Integer.parseInt(br.readLine());
System.out.println("Enter the money: ");
String s=br.readLine();
val=Float.valueOf(s.trim()).floatValue();
switch(ch)
{
case 1:System.out.println("SWISS "+val*1.2);

System.out.println("EURO "+val*1.8);
System.out.println("MEXICAN "+val*1.3);
break;
case 2:System.out.println("DOLLAR "+val*0.8);

System.out.println("EURO "+val*1.8);
System.out.println("MEXICAN "+val*1.3);
break;
case 3:System.out.println("DOLLAR "+val*0.8);

System.out.println("SWISS "+val*1.8);
System.out.println("MEXICAN "+val*1.3);
break;
case 4:System.out.println("DOLLAR "+val*0.8);

System.out.println("EURO "+val*1.8);
System.out.println("SWISS "+val*1.3);
break;
default:System.out.println("ERROR");
}
}
}

thanks and regards
prashu
[email protected]









Related Tutorials/Questions & Answers:
currency conversion
currency conversion   hi frds.. I wan jsp code to convert currency in different formats??... if u know plz plz plz post it   Please visit the following link: http://www.roseindia.net/tutorials/I18N/currency
currency converter
currency converter  hi i have encountered a problem while creating a pdf file in jsp.... my problem is i want commas for the currency which is diplayed in the pdf file... i'm using sybase, stored procedure for the front end
Advertisements
currency symbols in excel
currency symbols in excel  How to add a currency symbol in Excel sheet? Please guide me
ModuleNotFoundError: No module named 'Currency'
ModuleNotFoundError: No module named 'Currency'  Hi, My Python... 'Currency' How to remove the ModuleNotFoundError: No module named 'Currency... to install padas library. You can install Currency python with following
ModuleNotFoundError: No module named 'Currency'
ModuleNotFoundError: No module named 'Currency'  Hi, My Python... 'Currency' How to remove the ModuleNotFoundError: No module named 'Currency... to install padas library. You can install Currency python with following
Currency Symbol problem
Currency Symbol problem  Hi All, My Server side code...(); Currency currency = Currency.getInstance("MYR"); // Malaysia Code numberFormat.setCurrency(currency); int num = 12345; I want to print this in a JSP Page
javascript regex validate currency
javascript regex validate currency  How to validate currency in JavaScript?   <html> <head> <title>Currency validation... validate() { var currency = document.getElementById("currency").value
Currency Converter in PHP - PHP
Currency Converter in PHP  Can anyone give me an idea on how to convert US dollar, Rupees, euro and yen to pounds
Java Currency Converter
Java Currency Converter   Hi I was wondering if someone could help me write a program to convert Pounds into Euro's. The program should prompt the user to input the number of pounds and output the number of Euros
ModuleNotFoundError: No module named 'cbar-currency'
ModuleNotFoundError: No module named 'cbar-currency'  Hi, My... 'cbar-currency' How to remove the ModuleNotFoundError: No module named 'cbar-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'currency-calculator'
ModuleNotFoundError: No module named 'currency-calculator'  Hi, My... named 'currency-calculator' How to remove the ModuleNotFoundError: No module named 'currency-calculator' error? Thanks   Hi
ModuleNotFoundError: No module named 'currency-symbols'
ModuleNotFoundError: No module named 'currency-symbols'  Hi, My... named 'currency-symbols' How to remove the ModuleNotFoundError: No module named 'currency-symbols' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'currency-viewer'
ModuleNotFoundError: No module named 'currency-viewer'  Hi, My... named 'currency-viewer' How to remove the ModuleNotFoundError: No module named 'currency-viewer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-currency'
ModuleNotFoundError: No module named 'django-currency'  Hi, My... named 'django-currency' How to remove the ModuleNotFoundError: No module named 'django-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'trytond-currency'
ModuleNotFoundError: No module named 'trytond-currency'  Hi, My... named 'trytond-currency' How to remove the ModuleNotFoundError: No module named 'trytond-currency' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'currency-cloud'
ModuleNotFoundError: No module named 'currency-cloud'  Hi, My... named 'currency-cloud' How to remove the ModuleNotFoundError: No module named 'currency-cloud' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'currency-symbols'
ModuleNotFoundError: No module named 'currency-symbols'  Hi, My... named 'currency-symbols' How to remove the ModuleNotFoundError: No module named 'currency-symbols' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-currency'
ModuleNotFoundError: No module named 'django-currency'  Hi, My... named 'django-currency' How to remove the ModuleNotFoundError: No module named 'django-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'crypto-currency'
ModuleNotFoundError: No module named 'crypto-currency'  Hi, My... named 'crypto-currency' How to remove the ModuleNotFoundError: No module named 'crypto-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'currency-cloud'
ModuleNotFoundError: No module named 'currency-cloud'  Hi, My... named 'currency-cloud' How to remove the ModuleNotFoundError: No module named 'currency-cloud' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'currency-symbols'
ModuleNotFoundError: No module named 'currency-symbols'  Hi, My... named 'currency-symbols' How to remove the ModuleNotFoundError: No module named 'currency-symbols' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'currency-symbols'
ModuleNotFoundError: No module named 'currency-symbols'  Hi, My... named 'currency-symbols' How to remove the ModuleNotFoundError: No module named 'currency-symbols' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'currency-viewer'
ModuleNotFoundError: No module named 'currency-viewer'  Hi, My... named 'currency-viewer' How to remove the ModuleNotFoundError: No module named 'currency-viewer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-currency'
ModuleNotFoundError: No module named 'django-currency'  Hi, My... named 'django-currency' How to remove the ModuleNotFoundError: No module named 'django-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-currency'
ModuleNotFoundError: No module named 'django-currency'  Hi, My... named 'django-currency' How to remove the ModuleNotFoundError: No module named 'django-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'google-currency'
ModuleNotFoundError: No module named 'google-currency'  Hi, My... named 'google-currency' How to remove the ModuleNotFoundError: No module named 'google-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'google-currency'
ModuleNotFoundError: No module named 'google-currency'  Hi, My... named 'google-currency' How to remove the ModuleNotFoundError: No module named 'google-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'nh-currency'
ModuleNotFoundError: No module named 'nh-currency'  Hi, My Python... 'nh-currency' How to remove the ModuleNotFoundError: No module named 'nh-currency' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'cbar-currency'
ModuleNotFoundError: No module named 'cbar-currency'  Hi, My... 'cbar-currency' How to remove the ModuleNotFoundError: No module named 'cbar-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'crypto-currency'
ModuleNotFoundError: No module named 'crypto-currency'  Hi, My... named 'crypto-currency' How to remove the ModuleNotFoundError: No module named 'crypto-currency' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'currency-calculator'
ModuleNotFoundError: No module named 'currency-calculator'  Hi, My... named 'currency-calculator' How to remove the ModuleNotFoundError: No module named 'currency-calculator' error? Thanks   Hi
ModuleNotFoundError: No module named 'currency-markdown'
ModuleNotFoundError: No module named 'currency-markdown'  Hi, My... named 'currency-markdown' How to remove the ModuleNotFoundError: No module named 'currency-markdown' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'currency-viewer'
ModuleNotFoundError: No module named 'currency-viewer'  Hi, My... named 'currency-viewer' How to remove the ModuleNotFoundError: No module named 'currency-viewer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'google-currency'
ModuleNotFoundError: No module named 'google-currency'  Hi, My... named 'google-currency' How to remove the ModuleNotFoundError: No module named 'google-currency' error? Thanks   Hi, In your python
currency - Java Beginners
currency  helo guys can you share me a "JAVAcode" about Currency...=9.815 Mexican pesos sample input: ENTER TYPE OF CURRENCY:(so the user must choose a currency if dollars,swiss francs,euro dollars or mexican pesos)sample I
currency - Java Beginners
currency  helo guys can you share me a code about Currency... Mexican pesos sample input: ENTER TYPE OF CURRENCY:(so the user must choose a currency if dollars,swiss francs,euro dollars or mexican pesos)sample I input
Java array in currency converter
Java array in currency converter  Hi all, My sister is trying to teach me java. She's in school for programming and I'm not but I am just trying... not have any programming experience. Right now I am working on this currency
Why not use Double or Float to represent currency?
Why not use Double or Float to represent currency?  Why not use Double or Float to represent currency
Currency Format Example
Currency Format Example       This Example shows you how to format currency according to the locale. In the code given below we are formatting Currency according to the locale. Methods
ModuleNotFoundError: No module named 'currency-open-exchange'
ModuleNotFoundError: No module named 'currency-open-exchange'  Hi...: No module named 'currency-open-exchange' How to remove the ModuleNotFoundError: No module named 'currency-open-exchange' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-currency_rates'
ModuleNotFoundError: No module named 'django-currency_rates'  Hi...: No module named 'django-currency_rates' How to remove the ModuleNotFoundError: No module named 'django-currency_rates' error? Thanks   Hi
ModuleNotFoundError: No module named 'mastercard-currency-conversion'
ModuleNotFoundError: No module named 'mastercard-currency-conversion' ...: No module named 'mastercard-currency-conversion' How to remove the ModuleNotFoundError: No module named 'mastercard-currency-conversion' error
ModuleNotFoundError: No module named 'odoo10-addon-currency-monthly-rate'
ModuleNotFoundError: No module named 'odoo10-addon-currency-monthly-rate' ...: ModuleNotFoundError: No module named 'odoo10-addon-currency-monthly-rate' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-currency-monthly-rate
ModuleNotFoundError: No module named 'odoo10-addon-sale-company-currency'
ModuleNotFoundError: No module named 'odoo10-addon-sale-company-currency' ...: ModuleNotFoundError: No module named 'odoo10-addon-sale-company-currency' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-sale-company-currency
ModuleNotFoundError: No module named 'odoo11-addon-base-currency-iso-4217'
ModuleNotFoundError: No module named 'odoo11-addon-base-currency-iso-4217' ...: ModuleNotFoundError: No module named 'odoo11-addon-base-currency-iso-4217' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-base-currency
ModuleNotFoundError: No module named 'odoo11-addon-currency-rate-inverted'
ModuleNotFoundError: No module named 'odoo11-addon-currency-rate-inverted' ...: ModuleNotFoundError: No module named 'odoo11-addon-currency-rate-inverted' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-currency-rate
ModuleNotFoundError: No module named 'odoo12-addon-currency-rate-update'
ModuleNotFoundError: No module named 'odoo12-addon-currency-rate-update' ...: ModuleNotFoundError: No module named 'odoo12-addon-currency-rate-update' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-currency-rate-update'
ModuleNotFoundError: No module named 'odoo12-addon-l10n-br-currency-rate-update'
ModuleNotFoundError: No module named 'odoo12-addon-l10n-br-currency-rate-update...: ModuleNotFoundError: No module named 'odoo12-addon-l10n-br-currency-rate-update...-currency-rate-update' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo12-addons-oca-currency'
ModuleNotFoundError: No module named 'odoo12-addons-oca-currency'  Hi...: No module named 'odoo12-addons-oca-currency' How to remove the ModuleNotFoundError: No module named 'odoo12-addons-oca-currency' error? Thanks
ModuleNotFoundError: No module named 'odoo8-addon-account-invoice-currency'
ModuleNotFoundError: No module named 'odoo8-addon-account-invoice-currency...: ModuleNotFoundError: No module named 'odoo8-addon-account-invoice-currency' How...-currency' error? Thanks   Hi, In your python environment you

Ads