⇧
Contact Us
||
Privacy Policy
||
About Us
Home
Java
Progarm
PHP
Menu ▼
Program
Vowel or Constant
Area of Circle
Find the Triangle
Compound Interest
Prime Number
Reverse Number
Factorial Number
Sum of Element
User Input
Calculate Average
Even or Odd
N Prime Number
1 to n Prime Number
Reverse String
Reverse String by User
Check Leap Year
HexaDecimal String
Binary to Decimal
Get IP
Check ArmStrong
ArmStrong Or Not
next →
← prev
4) Write a program calculate the Compound Interest.
Program
Compount Intrest import java.util.Scanner; import static java.lang.Math.pow; class CI { public static void main(String args[]) { double amount=0,principle,rate,time,ci,t=1; Scanner sc=new Scanner(System.in); System.out.println("Enter principle "); principle=sc.nextDouble(); System.out.println("Enter rate"); rate=sc.nextDouble(); System.out.println("Enter time"); time=sc.nextDouble(); rate=(1+rate/100); for(int i=0;i
Next Topic
← prev
next →