473,394 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

will you help me guys my java code program

10
import java.util.*;
public class Kopi
{

static Scanner console=new Scanner(System.in);
public static void main(String[]args)
{
String f;
double a,z,y,x,w;

System.out.println("Enter a currency you wish to convert:");
System.out.println("dollars,swiss,euro,mexican");

f=console.next();
System.out.println("okay");

System.out.println("Enter a value:");
a=console.nextInt();
System.out.println("you have:");

double euro= 0.9553;
double swiss=1.4054;
double mexican=9.815;
double dollars=1.0000;
z=a*euro;
y=a*swiss;
x=a*mexican;
w=a*dollars;

System.out.println("euro="+ z);
System.out.println("swiss="+y);
System.out.println("mexican="+x);
System.out.println("dollars="+w);

}

}

(this is my code)
WHAT CODE SHOUD I ADD TO MY PROGRAM IF I WILL ENTER EURO(currency) IT WILL NOT APPEAR WITH THE VALUE IT SELF

SAMPLE OUTPUT:Enter a currency you wish to convert: DOLLARS
Enter a value: 100
Swiss:__________
Euro:___________
Mexican:_________

coz in my program if i choose a currency sample dollar it will appear the value of dollar ..so i want it only display 3(swiss,euro,mexican) currency in coresponding converts.thats only my problem..i want to know what to add a code or program.... pls!help me!
Aug 10 '08 #1
1 1126
JosAH
11,448 Expert 8TB
Don't start multiple threads for the same problem; you have another thread still
open. If you want more attention to your thread reply to it yourself with a short
message; that will put your thread at the head of the list again. Double posts
are confusing for anyone reading this. I'll close this thread. Also note that today
is Sunday; Sundays are very quiet around here.

kind regards,

Jos
Aug 10 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
crystal2005
by: crystal2005 | last post by:
Hello guys, I'm a beginner in Java application programming. I started to write a Java application in which link to MS Access database. I encountered a problem in deletion function. E.g. I would...
11
by: hamiltongreg | last post by:
I am new to Java and am having problems getting my program to compile correctly. My assignment is as follows; Choose a product that lends itself to an inventory (for example, products at your...
1
by: shadowofanubis66 | last post by:
Basically, the project I'm working on this week is to make a school lunch menu with a GUI, when the person types in a day, the menu for that day shows up. We have two files, ones a day off text file...
1
by: yjh0914 | last post by:
hello guys! its my first time posting on this site and the reason is becz i have a java hw my teacher assigned. i have to make a program that basically ranks students by their cumulative gpa. the...
0
by: yjh0914 | last post by:
hi guys! so im basically editting my post i made earlier as it wznt as specific.. i have to make a program that basically ranks students by their cumulative gpa. the student's info is on a csv file...
1
by: mshroom12 | last post by:
Hello to all. I am having difficulty trying to do this Java project using Eclipse. The following is what I have to do. Election Day It's almost election day and the election officials need a...
3
by: nitric | last post by:
hey guys, i'm really stuck on this program. It's basically a survey and I have to ask people what drinks they like. 1-4, coffee tea oj and lemonade. i'm having trouble counting the TOTAL NUMBER...
2
by: cioccolatina | last post by:
Hey guys, is there anyone who could help me..? I have file ExpressionBinaryTree.java : /** class ExpressionBinaryTree * uses a binary tree to represent binary expressions * does not...
2
by: bvav22 | last post by:
Hey guys, im trying to finish an assignment for a java class, and i have finished the program except for one part. The program requires that i take 3 values inputted from the user, the first 2 must...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.