Currency - Rounds number to 2 decimal places public static...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package currencyconverter; /** * * @author Allan */ public class Currency{ //Exchange rates for Thursday 1/28/10 public static double exchange[] = {0.7174 , 1.0684, 89.9600, 0.6195, 0};
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // Rounds number to 2 decimal places. public static double Round(double Rval) { double p = (float)Math.pow(10,2); Rval = Rval * p; double tmp = Math.round( Rval); return (double)tmp/p; } }...
View Full Document

This note was uploaded on 03/03/2011 for the course COMP 121 taught by Professor Hopkins during the Spring '08 term at Texas A&M.

Ask a homework question - tutors are online