Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process i want immediate code
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


kalavathi
i want immediate code
1 Answer(s)      6 years and a month ago
Posted in : Development process



Advertisement
View Answers

December 17, 2008 at 5:45 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;
}
}


For more information on Java visit to :

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

Thanks



Related Tutorials/Questions & Answers:
i want immediate code - Development process
i want immediate code  Basic sales tax is applicable at a rate of 10... of 5%, with no exemptions. When I purchase items I receive a receipt which lists...: 74.68   Hi friend, Code to help in solving the problem : import
i want code for these programs
i want code for these programs   Advances in operating system Laboratory Work: (The following programs can be executed on any available and suitable platform) Design, develop and execute a program using any
Advertisements
I want code below mention programe
I want code below mention programe  Create a web application using any technology that accepts a keyword and displays 10 relevant tweets from Twitter in real-time for that keyword
i want horizontal mlm tree structure code in php with jquery or Ajax
i want horizontal mlm tree structure code in php with jquery or Ajax  i need horizontal mlm tree structure code in php with jquery or Ajax... in advance.. Thank you
Hi i want java code that diaplays server scren at the client side
Hi i want java code that diaplays server scren at the client side  Hi I'm Shivaprasad i want java socket code that shows the server side screen when client gets connected with the server. Please help me   Please visit
i want java code for this xml file...please show me..
i want java code for this xml file...please show me..   xbrli:shares xbrli:pure iso4217:INR
This code send email two times but i want only once
This code send email two times but i want only once   public void dbbackup_notify(String email,String data,String subject){ String toEmails = email; Session session=Session.getInstance(props, new
This code send email two times but i want only once
This code send email two times but i want only once   public void dbbackup_notify(String email,String data,String subject){ String toEmails = email; Session session=Session.getInstance(props, new
want a code
want a code  I am trying to write Java code for creating a file of any type (either text,csv,or any other format). What I need is : The file generated should be zipped and password-protected. When I try to open the file, it asks
i want to update values
i want to update values  in my form i have 2 submit buttons one... database and it need to insert automatically in to disabled text boxs and once i press the edit button all text boxs need to enable so that i can edit my details
i want to learn Jquery
i want to learn Jquery  i want to learn jquery can u plz guide me   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
i want for statement codding
i want for statement codding  what is the for condition following out put 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session   sig
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.  I have a tex box. in that i want user should enter data in the format specified(for eg--abcde_)how
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... for particular jsp pages? If we want to develop any jsp pages using eclipse where we can
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... for particular jsp pages? If we want to develop any jsp pages using eclipse where we can
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..   i want to convert... project.. but i cant convert Image file to its byte code format.. if anybody can plz
i want to copy files from one machine to other using java and the code will be running on third machine
i want to copy files from one machine to other using java and the code will be running on third machine  i want to copy some files from one machine... machine say 'c'. So , can you help me on this that how can i do this using
I want to know the all possible syntax for EL code to print the first element of an array.
I want to know the all possible syntax for EL code to print the first element of an array.  Which is the correct EL codes syntax to print the first element of an array named employeeArray. ${employeeArray["0"]} or ${employeeArray
i want to create website,with manu with three level submenu on top side of page please send me code java
i want to create website,with manu with three level submenu on top side of page please send me code java   iam createing wibsite thats using eclipse andtomcat server,please help me to write menu with three level submenu
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session   sig   Hi Friend, Please visit the following link: http://roseindia.net/jsp/bank.shtml Thanks
I want to Transfer only 1/3rd of contents from one folder to other but my code is transferring all contents
I want to Transfer only 1/3rd of contents from one folder to other but my code...("No files in directory: " + src); } for (int i = 0; i < entries.length; i++) { File file = entries[i
Use of immediate attribute
Use of immediate attribute  What is the use of immediate attribute
reg : the want of source code
reg : the want of source code  Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code...) Available Seats and etc. plz Give Me Full Source code with Database
I want solution for this jsp program..
I want solution for this jsp program..   <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %> JSP Page <%! String
i want to create dynamic calendar in java
i want to create dynamic calendar in java  i want code and explanation
i want to create dynamic calendar in java
i want to create dynamic calendar in java  i want code and explanation
i want display integer number in a string of statement
i want display integer number in a string of statement  i want display integer number in a string of statement
I want to learn Hibernate tutorial quickly
I want to learn Hibernate tutorial quickly  Hello, I want to learn Hibernate tutorial quickly. Is there any way.. I want to learn Hibernate online.. Please help
same thing i want but from db..
same thing i want but from db..  http://www.roseindia.net/tutorial/javascript/dynamicCombo.html same thing i want but from db
I want detail information about switchaction? - Struts
I want detail information about switch action?  What is switch action in Java? I want detail information about SwitchAction
 

 

 

DMCA.com