urgent

urgent

View Answers

December 12, 2008 at 3:47 AM

Hi friend,

Code to help in solving the problem :

import java.text.DecimalFormat;
class SalesTax
{
public static void main(String[] args)
{
double i11 = 12.49;
double i12 = 14.99;
double i13 = 0.85;
double st2 = i12 + ((i12*10)/100);
double t1 = i11+st2+i13;
System.out.println("Input ");
System.out.println("1 book at "+i11);
System.out.println("1 music CD at "+i12);
System.out.println("1 chocolate bar at "+i13);
System.out.println("");
System.out.println("Output ");
System.out.println("1 book at "+i11);
System.out.println("1 music CD at "+test(st2));
System.out.println("1 chocolate bar at "+i13);
System.out.println("Sales Taxes : "+ test((i12*10)/100));
System.out.println("Total : " + test(t1));
}

private static String test(double d) {
String string = doubleToString2(d);
return string;
}

public static String doubleToString2(double d) {
DecimalFormat fmt = new DecimalFormat("0.00");
String string = fmt.format(d);
return string;
}
}

Thanks









Related Tutorials/Questions & Answers:
urgent need
urgent need   Input a line. Count the number of words that start with a capital letter
Urgent requirement
Urgent requirement  I want to implement Autocompletion code for Jcombobox in swing can you please help me out from
Advertisements
Urgent
ModuleNotFoundError: No module named 'urgent'
ModuleNotFoundError: No module named 'urgent'  Hi, My Python... 'urgent' How to remove the ModuleNotFoundError: No module named 'urgent'... to install padas library. You can install urgent python with following command
Urgent Answer Req
Urgent Answer Req  how to view the file content which is at client side from jsp in java
its urgent - Development process
in a folder.its urgent
PLease reply its urgent
PLease reply its urgent   Write a java function that has the signature ΓΆβ?¬Ε?Public static int clock Inter sections(int hours, int minutes)ΓΆβ?¬Β...:minute:second format.   How's that urgent
Urgent Solution required
Urgent Solution required  This is possible to transfer that file from client to server and read that file and view it in JSP. If it is can you send the example. thanks alot in advance   Hi, You can create a JSP file
java linked list urgent!!!
java linked list urgent!!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
java linked list urgent !!!
java linked list urgent !!!  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list. The list must
Please help me urgent...........
Please help me urgent...........  For what kind of a problem would use a Tree Set and not a Tree Map For what kind of a problem would use a Tree Map and not a Tree Set   Hello Friend,ADS_TO_REPLACE_1 If you want
urgent please, help!
urgent please, help!  how to make jTable unclickable and have unmovable columns, thanks in advance   import javax.swing.*; import java.awt.*; public class SimpleJTableExample{ public static void main(String[] args
Program urgent - JSP-Servlet
Please please its very urgent.. Thanks/Regards
Urgent: HttpRequest - JSP-Servlet
Urgent: HttpRequest  Hi, I want to send a http Request. Their will be another program which will receice the request process it and send back the response. Example: I have one page in which I am giving 2 numbers as input
Program Urgent - JSP-Servlet
Program Urgent  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside Enter Employee ID... automatically with the selected Employee ID and Name. Its Very Urgent.. Please send me
urgent - Development process
urgent  i want total source code for this question.its urgent and important.please ....... A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated
Download.jsp Urgent - JSP-Servlet
.. Please send me the modified code ASAP as this goes very urgent in my case
urgent - Development process
urgent  i want total source code for this question.its urgent and important.please ....... A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must
Urgent programming assignment
Urgent programming assignment   Hi, I am an Indian student in USA.I have been able to write all the java codes successfully , however this one is giving me tremors.Any help would be highly appreciated.I am attaching
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
on-line examination project?(urgent pls)
on-line examination project?(urgent pls)  Hello friends, i am doing an on-line examination project. In A page i will get n(user requirement) questions from data base(question and five radio buttons) if the user had
Need urgent help with C++ errors!
Need urgent help with C++ errors!  hi, i'm new to C++ programming. this is my code... i'm using Turbo C++. It's showing so many errors!.. I don't know what to do. Please help!! #include<iostream.h> void main
URGENT !!!!! Any PERL language Expert .
URGENT !!!!! Any PERL language Expert .   I have input 50 amino acid sequences in NetPhos 2.0 server to know position of phosphorylation sites. I want to extract or parse the position of phosphorylated serine, tyrosine
Program Very Urgent.. - JSP-Servlet
Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I got the link you sent. But I find a simple problem... its most urgent.. Thanks/Regards, R.Ragavendran..   Hi friend
Need the program urgent veryyyyyyyyyyyyy urgent plsssssssssssssssssss follow the standard in the program
Need the program urgent very urgent please follow the standard in the program  Restaurant Order Management System (ROMS) Problem Case: Create a ROMS system, which is intended to take an order from the customer and charge
Urgent java programming question.Pls help
Urgent java programming question.Pls help  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each randomly generated number into a node and then attach the node to a linked list
Programming Help URGENT - JSP-Servlet
Programming Help URGENT  Respected Sir/Madam, I am R.Ragavendran. I am in urgent need of the coding. My requirement is as follows: Beside... URGENT
urgent-Exception in Tomcat - Java Beginners
urgent-Exception in Tomcat  I am using eclipse ee and tomcat server. my jsp pages are working fine.after some time it cant display my jsp pages.it raises following exception.Html pages is working . HTTP Status 500
JSP and AJAX- very urgent - Ajax
Plz its very very Urgent.. Regards, Ragavendran
Binary search tree (insertion) urgent!!
Binary search tree (insertion) urgent!!  Create a program to construct a binary search tree consisting of nodes that each stores an integer in Java.Avoid duplication of values when inserting nodes in the tree. When a new leaf
Download.jsp Urgent plz - JSP-Servlet
Download.jsp Urgent plz  Respected Sir/Madam, I am R.Ragavendran.. I got your coding for download.jsp.. A lot of Thanks for it.. In this code, as an output, I am getting the open/Save dialog as desired.. But when I
its urgent for me - Development process
its urgent for me  Hi All, this is kalavathi,i am new to alfresco.present i am using alfresco3.9b version.my problem is i was writing code in java using alfresco.it is not working and i am not able to understand what
its very urgent please help me
its very urgent please help me  how can i retrieve all images from ms access database and display in jsp pages
urgent help for inserting database in a project
urgent help for inserting database in a project   I need some urgent help i have made java application for conducting a quiz which displays 25 mcq's and then the result at the end.I need to add simple database connectivity
urgent help for inserting database in a project
urgent help for inserting database in a project   I need some urgent help i have made java application for conducting a quiz which displays 25 mcq's and then the result at the end.I need to add simple database connectivity
Ple help me its very urgent
Ple help me its very urgent  Hi.. I have one string 1)'2,3,4' i want do like this '2','3','4' ple help me very urgent
URGENT: Export Table in Oracle db to CSV file
URGENT: Export Table in Oracle db to CSV file  Hi, Could you basically help me by providing a program in Java. I want a program to connect and export a table in the oracle database to a folder in my local harddrive. Thankyou
very urgent
swing program plz urgent sir - Java Beginners
swing program plz urgent sir   hi sir,i waan a jtable swings program table having column names "itemid","price".Initially table having single empty row.whenever we click the "enter" button automatically new row will be insert
very urgent, want to submit my project on monday
very urgent, want to submit my project on monday  i have the code for connected combo-boxes(jsp). But the thing i want to know is, how to access the values selected in those combo-boxes, for storing in database. in the case
reply me its urgent - Java Beginners
urgent.  hi friend, i think password is wrong or username may be wrong
pls help me sir its urgent
pls help me sir its urgent  thanks for reply, but i am getting this error pls help me its urgent type Exception report message description The server encountered an internal error () that prevented it from
Basic problem but very urgent - JSP-Servlet
me the cause of the problem asap because its most urgent.. Thanks/Regards
very urgent - Java Server Faces Questions
check it once and give me a correct solution. It is very urgent for me. Thanks
Urgent query about CreateTextFile using Javascript
Urgent query about CreateTextFile using Javascript  Dear All, I am creating a file using the code below which create a text file, but I don't want any body to access the same, either it should be password protected or it should
very urgent - Java Server Faces Questions
very urgent  Hi sir, see my code and please tell me mistake. it is very urgent for me. here is my code: addmin.jsp: Users... [email protected] 8888 deepak kumar It is very urgent for me please give

Ads