My first java application
Please post all your completed software applications in here. This is for full software which you have created and wish to release and share with everyone.
5 posts
Page 1 of 1
This is my very first java program
I made this program that can tell how many euro danish crowns is
1 Euro = 7,45 Danish Crowns
Put amount to exchange
Amount was 7,45 Danish crowns
I made this program that can tell how many euro danish crowns is
1 Euro = 7,45 Danish Crowns
Put amount to exchange
Amount was 7,45 Danish crowns
Code: Select all
import javax.swing.JOptionPane;
public class Valuta {
public static void main(String[] args) {
double vul, val, sum;
String str1 = JOptionPane.showInputDialog("Indtast et tal du vil omregne til euro");
str1 = str1.replaceAll(",", ".");
vul = 7.45;
val = Double.valueOf(str1.trim()).doubleValue();
sum = val / vul;
System.out.println(val + "Dkk omregnet til Euro = " + sum + "Euro");
JOptionPane.showMessageDialog(null, str1 + " Dkk er = " + sum + " euro", "Dkk til Euro ", JOptionPane.INFORMATION_MESSAGE);
}
}
cool
but do you have to always add the converted value in the code itself?
seems it gonna be a LONG project then :lol:
but do you have to always add the converted value in the code itself?
seems it gonna be a LONG project then :lol:
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Dummy1912 wrote:coolNo i dont add the converted value
but do you have to always add the converted value in the code itself?
seems it gonna be a LONG project then :lol:
sum = val / vul
vul is always 7,45 and val is your input
50 / 7,45 = 6,71 Euro
7,45 / 7,45 = 1 Euro
Last edited by AnoPem on Sun Sep 02, 2012 8:36 am, edited 1 time in total.
haha sorry my mistake then
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023