# help me

sassy
help me
Posted in : Java Beginners

August 18, 2008 at 12:01 PM

Hi friend,

import java.io.*;
import java.math.*;
import java.text.*;
class Converter
{
public static void main(String a[]) throws Exception
{

String currType="";
String currConvert="";
double amount;
System.out.println("1 dollar=1.4054 Swiss francs");
System.out.println("1 dollar=0.9553 Euro dollars");
System.out.println("1 dollar=9.815 Mexican pesos");
System.out.println("");
System.out.println("Choose The Option Currency Type");
System.out.println("A - Dollar");
System.out.println("B - Euro dollars");
System.out.println("C - Mexican pesos");
System.out.println("D - Swiss francs");

System.out.println("Enter Amount");
System.out.println("");
System.out.println("Choose The Option Convert Currency Type");
System.out.println("A - Dollar");
System.out.println("B - Euro dollars");
System.out.println("C - Mexican pesos");
System.out.println("D - Swiss francs");

if((currType.equals("a") || currType.equals("A")))
{
System.out.println("hfdjghjfdh");
if((currConvert.equals("b") || currConvert.equals("B")))
{
amount =amount * 0.9553;
}
else if((currConvert.equals("c") || currConvert.equals("C")))
{
amount = amount * 9.815;
}
else if((currConvert.equals("d") || currConvert.equals("D")))
{
amount = amount * 1.4054;
}
else
{
System.out.println("No Type");
}

DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" );

double dd2dec = new Double(df2.format(amount)).doubleValue();

System.out.println(dd2dec);
}

August 18, 2008 at 12:06 PM

else if((currType.equals("b") || currType.equals("b")))
{
System.out.println("hfdjghjfdh");
if((currConvert.equals("a") || currConvert.equals("A")))
{
amount = (1/0.9553)*amount;
}
else if((currConvert.equals("c") || currConvert.equals("C")))
{
amount = amount * (9.815/0.9553);
}
else if((currConvert.equals("d") || currConvert.equals("D")))
{
amount = amount * (1.4054/0.9553);
}
else
{
System.out.println("No Type");
}

DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" );

double dd2dec = new Double(df2.format(amount)).doubleValue();

System.out.println(dd2dec);
}
else if((currType.equals("c") || currType.equals("C")))
{
System.out.println("hfdjghjfdh");
if((currConvert.equals("a") || currConvert.equals("A")))
{
amount = (1/9.815)*amount;
}
else if((currConvert.equals("b") || currConvert.equals("B")))
{
amount = amount * (0.9553/9.815);
}
else if((currConvert.equals("d") || currConvert.equals("D")))
{
amount = amount * (1.4054/9.815);
}
else
{
System.out.println("No Type");
}

DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" );

double dd2dec = new Double(df2.format(amount)).doubleValue();

System.out.println(dd2dec);
}

August 18, 2008 at 12:07 PM

else if((currType.equals("d") || currType.equals("D")))
{
System.out.println("hfdjghjfdh");
if((currConvert.equals("a") || currConvert.equals("A")))
{
amount = (1/1.4054)*amount;
}
else if((currConvert.equals("b") || currConvert.equals("B")))
{
amount = amount * (0.9553/1.4054);
}
else if((currConvert.equals("c") || currConvert.equals("C")))
{
amount = amount * (9.815/1.4054);
}
else
{
System.out.println("No Type");
}

DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" );

double dd2dec = new Double(df2.format(amount)).doubleValue();

System.out.println(dd2dec);
}

}
}

http://www.roseindia.net/java/

Thanks

help me
help me  i have done as u directed but nothing happens gud to me..... . i am using netbeans is that matter at all help me and take me out from trouble where to store jfree api to use it for j2ee based project
help me
help me  HI. Please help me for doing project. i want to send control from one jsp page to 2 jsp pages... is it possible? if possible how to do
help me
help me  please send me the java code to count the number of similar words in given string and replace that word with new one
help me
help me  MY GLASSFISH SERVER NOT START PROPERLY help me warning shows DPL5404:Specification-Version for the optional package [ GNUJAXP ] in the jarfile [ C:\Program Files\Java\jdk1.7.0_02\jre\lib\ext\gnujaxp.jar
help me
help me  hi sir pls tell me how to use ajax form validatin from very simple way with two ot three text field pls help me use ajax in php my email id is:- [email protected] pls sir give me some vasic information i know
help me..
help me..   what are the component needed by grid computing, cloud computing and ubiquitous computing? discuss about the security of above computing. difference between that 3 computing
help me...
help me...  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog
help me..
help me..  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog mad
help me
button, and nationality I'm using dropdown list. Please help me. your kindness...help me  Hi I'm loges. I'm doing my final year project now, I have some problem in my project and i need some help on it. NowI'm doing a site
help me...
help me...  there is the picture given - cat - dog - rabbit - mouse a. create a class name b. create its attributes (at least 3 attributes) : species, size, leg c. create its methods ( at least 3 methods) : walk, eat, sleep
help me..
help me..  Design and write a class named Person and its two subclasses named Student and Employee. Make Lecturer and Admin subclasses of Employee. A person has a name, address, phone number and email address. A student has
help me
help me
Help me
Help me  Hi, LWUIT is working in eclipse j2me for Symbian OS
help me
the order, Fourth button is Find length of text. and there are panels. Please help me...help me  Dear sir/medam i would like to know how to use the java string class method my programm have four button,(enter the text) that first
help me
help me  how to print from a-z, A-Z with exact order using for loop? Thanks for all concern
Help Me
Help Me  What is the source code for Sample example for Mortgage Calculator in J2ME language for developing Symbian
Help me
Help me  plz i want code of program to add real numbers and magic numbers in java example this input :- 5+3i-2+3i output:- 3+6i
help me
help me  pls... xplain dis code:- function go() { window.location.replace("logout.jsp",'window','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); self.close
Help me
Help me  hello!!!!. i have a Excel file which includes 4 columns and somewhat 8500 rows.these rows i have printed in SQL thru Excel file and i have 1 MYSql database which includes all those 4 fields i have defined in excel file
help me
help me  I have a quastion a bout array whic is>>> 1-write aprogram to diplay a multiplication table for 1to 10 by entering the start number and the end number. EXAMPLE: ENTER START NUMBER:1 ENTER END NUMBER:3
help me
help me  Create a GUI application that allows a user to select a text file (using the JFileChooser). The program will then allow the user to do the following operations (selection of these operations must be made by clicking
Help me
Help me  HI I am using Tomcat6.0 this is the problem i got wen i run the code java.lang.NullPointerException org.apache.jsp.loginjsp.jspInit(login_jsp.java:23) org.apache.jasper.runtime.HttpJspBase.init
Help me
Help me  HI I am using Tomcat6.0 this is the problem i got wen i run the code , i am using login.html ,login .jsp,login.java and web.xml code java.lang.NullPointerException org.apache.jsp.loginjsp.jspInit(login_jsp.java:23
help me - WebSevices
help me   help me with the principals of designing agood websites and i can start
help me - WebSevices
help me   help me with the principals of designing agood websites and i can start
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger