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

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);
    }
}









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 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
wrapper class
wrapper class  list wrapper class methods
wrapper class
wrapper class  wrapper class methods
wrapper class
wrapper class  why wrapper class does not have a default constructor
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
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
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
Wrapper Class - Java Beginners
Wrapper Class  What is Wrapper class? Why are they use
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
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
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
Wrapper Class - Java Beginners
Wrapper Class  Please explain the above question on Wrapper class with some examples
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
write a program to use for loop print **********========== in c language
write a program to use for loop print **********========== in c language  write a program to use for loop print **========== in c language
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
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
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
How to Read file line by line in Java program
? that includes a text. 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.ADS_TO_REPLACE_2 BufferedReader class
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-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
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
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
Examples of Wrapper Class
Examples of Wrapper Class In this page we are giving you the links of tutorials on wrapper classes in Java. Wrapper classes are the classes present...) char 8) booleanADS_TO_REPLACE_1 Following are the example of wrapper classes
Wrapper Character class.
Wrapper Character class.  How do the methods 'isIndentifierIgnorable(ch)' and 'isISOControl(ch)' work?? while workin with 'Character' wrapper class... no-break space '\uFEFF' Example: public class IsIdentifierIgnorableExample
How To Make This Program - Java Beginners
How To Make This Program  How To Make Java Calculation program I want to Write a program in Java that calculates the sum of digits of an input number, prints it, then calculates the sum... output: 59 14 5 please help to make
Use of write method of CheckedOutputStream class in java.
Use of write method of CheckedOutputStream class in java. In this tutorial, we will discuss the use of write(int b) method of CheckedOutputStream class... to use write(int b) method of CheckedOutputStream class. The FileInputStream class
write a java program
write a java program  write a program to print '*' in a circular form
Quadratic Equation - Java Beginners
to solve an equation (y/n)? y Enter a: 1 Enter b: -5 Enter c: 6 Root1: 2.0 Root2: 3.0 Do you want to solve an equation (y/n)? y Enter a: 1 Enter b: -1...Quadratic Equation  Write a program that will determine the roots
write a program - Java Beginners
write a program  1. write a program that reads a string composed of 6 words then generate and print a word composed of the first letters of the 6 words.  Hi friend, Code to solve the problem : class FirstLetter
write a program to print
write a program to print   write a program to print following 1 2 3 4 5 4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 3 2 1 1 2 2 1 1 1
How to write Java Program
How to write Java Program  how to write a program to find average of 5 student marks
how to make paging with class and ajax
how to make paging with class and ajax  paging with class and ajax
how to make a program on array
how to make a program on array  When you make a program on array that the element will move downward and upward and when you input twice 0 then thats the time that it will not move. pls. give me a formula...tnx
WRITE A PROGRAM IN JAVA
WRITE A PROGRAM IN JAVA  Write program which accepts five students id,name,age,department,courses, taken and its grade. a. calculate its GPA . display all student information in ascending order
how to make following pyramid using loop
how to make following pyramid using loop   1 212 32123 4321234... that displays the following pattern: 1 212 32123 4321234 543212345 4321234 32123 212 1 class Pattern{ public static void main(String
make this program in java
make this program in java  given array a[1,5,3,1].want to take value from array and print star(*) that number times columm wise . output shuld
write the java program?
write the java program?  1 11 121 1331 14641 15101051
write the java program?
write the java program?  1 11 121 1331 14641 15101051
Write java program?
Write java program?  1 11 121 1331 14641 15101051
Write java program?
Write java program?  1 11 121 1331 14641 15101051
write program - Java Beginners
write program  write a java program that will read the values... for Matrix Multiplication : class MatrixMultiplication{ public static void...= array.length; System.out.println("Matrix 1 : "); for(int i = 0; i < x

Ads