write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n

Ads
 

write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n

write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n

View Answers

March 29, 2011 at 11:07 AM

import java.util.*;
class Investment
{
    public static void main(String[] args) 
    {
        Scanner input=new Scanner(System.in);
        System.out.print("Enter the value of p: ");
        double p=input.nextDouble();

        System.out.print("Enter the value of r: ");
        double r=input.nextDouble();

        System.out.print("Enter the value of n: ");
        double n=input.nextDouble();

        double v1=1+r;
        double v2=Math.pow(v1,n);
        double v=p*v2;
        Double d=new Double(v);
        System.out.println(d);
    }
}

Ads









Related Tutorials/Questions & Answers:
write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n
write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n  write a program to evaluate the following investment equation make use of wrapper class v=p(1+r)rest to n
write a program to demonstrate wrapper class and its methods......
write a program to demonstrate wrapper class and its methods......  write a program to demonstrate wrapper class and its methods
Advertisements
write following program
write following program  Q1 What is the difference between single...-threading. Explain with examples Q2 Write a java applet that takes your name through a parameter from the HTML file and displays it Q3 Write a short note
write a java program that implements the following classes:
write a java program that implements the following classes:  write a java program that implements the following classes: A) a) Point in the Cartesian... implements the following methods 1)getArea() method. 2)getVolume() method. B
Write a program that makes use of a class called Employee that will calculate an employee's weekly paycheque.
Write a program that makes use of a class called Employee that will calculate an employee's weekly paycheque.  Write a program that makes use... your class based on the UML diagram to the right as well as the following notes
write a program in C to print following triangles on the screen
write a program in C to print following triangles on the screen  write a program in C to print following triangles on the screen
Write a program named InternetCharge_YourLastName that do the following:
Write a program named InternetCharge_YourLastName that do the following: ... per month unlimited access is provided. Write a program named InternetCharge_YourLastName that do the following: *display the menu as follow: 1. Package A 2
Write a java program that prints out the following menu???
Write a java program that prints out the following menu???  Write a java program that prints out the following menu. Auser can interact with the menu... another input. Menu : 1. Find min between 3 numbers using (Math.min). 2. Get
Wrapper Class
Wrapper Class  what is wrapper class in java and why we use it  ... the following link: Wrapper Class Thanks   Hi Friend, Wrapper class... further. For more information, visit the following link: Wrapper Class Thanks
A program in Java to evaluate APL expressions.
to left For example: 1+23 = 7 but 23+1 =8 4-2-1 = 3 (same as 4 - (2-1)) Portion enclosed in braces evaluated first as in (2*3)+1 which is 7. Write a program...A program in Java to evaluate APL expressions.  APL is a programming
wrapper class
wrapper class  list wrapper class methods
wrapper class
wrapper class  wrapper class methods
Java Wrapper Class Example
Java Wrapper Class Example In this section we will read about how to use... type has the corresponding wrapper class. These wrapper classes belongs... respective wrapper class : Primitive Data Type Wrapper Class boolean
wrapper class.
wrapper class.  Write short note on character wrapper class.   Java Character Wrapper class The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c  class rose { int n; int i; rose(int n,int i) { n=173; i=371; } void out { System.out.println
wrapper class
wrapper class  why wrapper class does not have a default constructor
write a program
write a program  write a program add 2 no.s without use arithmetic,unary operaters in java
write a java program to print marklist of n students. input Register number, name and marks of three subjects.
write a java program to print marklist of "n " students. input Register number, name and marks of three subjects.  write a java program to print marklist of "n " students. input Register number, name and marks of three subjects
wrapper class concept
wrapper class concept  Write a Java class that stores an integer item id, a string item name and a float price. Store all these in a String member Variable, separated by a space delimiter. Use an overloaded method to add
make a program
make a program  GoodEmployee is defined who has ALL the following properties: He should be married. He should have 2 or less than 2 children. His... two times. The name of one of his children should be "Raja" Write a method
How to Read file line by line in Java program
. Now first thing a program has to do is to find the file. For this we use FileInputStream class. FileInputStream class extends the java.io.InputStream. It reads a file in bytes. BufferedReader class extends java.io.Reader. It reads
write a program in java.
write a program in java.  arrange the natural n umber in 5x5 matrix...; public class NumberSpiral{ public static void main(String[] args) { int n=5; int i, s = n,x=0, y=0; int arr [][]= new int [n][n]; i=n*n; while(i>=1
core java code for following program
games. Write a program that will track all the details of this hosting.... The following are the guidelines while writing this program Only command line based... the program. Use Collections Framework. Apply Object Oriented programming principles
Write a program in java...
Write a program in java...  Hi, friends Please, can you help me? Q1: Write a program in java to simulate a calculator. Your program should take two... to enter an integer number. Write a program in java to find the factorial
need a java program for the following
need a java program for the following  Write a java program with three horizontal sliders. Name the sliders, the first one as red, the second one as green and the third one as blue. You design the program such that on varying
Java Write To Image File Example
Java Write To Image File Example To Write Image in different format you may use javax.imageio.ImageIO class. To compress the image in different format you... images using write() method of ImageIO class that takes three parameters
C program to print the following
C program to print the following  Hello, Some one help me with a "C Program" to print the following as output: 4444444 4333334..., that is why I choosed Java Beginners, but please give me a C program
Character Wrapper Class.
Character Wrapper Class.  what are Mirrored Unicode Characters?? and whats the use of "isMirrored(ch);method ??.where ch is any character argument..!!   Unicode is capable of representing many languages, including those
java-wrapper class
java-wrapper class  dear people, may i know how to convert primitive data type into corresponding object using wrapper class with example please!!!   public class IntToIntegerExample { public static void
write a java program
write a java program  write a program to print '*' in a circular form
how to make paging with class and ajax
how to make paging with class and ajax  paging with class and ajax

Ads