Severity: Warning
Message: fopen(/tmp/ci_sessionqqgouboe1u2lev5ebog8mgh1t82s2puu): failed to open stream: No space left on device
Filename: drivers/Session_files_driver.php
Line Number: 176
Backtrace:
File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct
File: /var/www/html/index.php
Line: 311
Function: require_once
Severity: Warning
Message: session_start(): Failed to read session data: user (path: /tmp)
Filename: Session/Session.php
Line Number: 143
Backtrace:
File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct
File: /var/www/html/index.php
Line: 311
Function: require_once
This program finds the compound interest for the given inputs. This source code is written in Java.
This source code takes the inputs of principle, rate of interest and time. By entering the basic formulas we get the requires amount and compound interest by calculation.
Implemenation of the source code
import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
double A=0,Pri,Rate,Time,t=1,CI;
Scanner S=new Scanner (System.in);
System.out.print("Enter Principal : " );
Pri=S.nextFloat();
System.out.print("Enter Rate : " );
Rate=S.nextFloat();
System.out.print("Enter Time : " );
Time=S.nextFloat();
Rate(1 + Rate/100);
for(int i=0;i<Time;i++)
t*=Rate;
A=Pri*t;
System.out.print("Amount : " +A);
CI=A-Pri;
System.out.print("\nCompound Interest : " + CI);
OUTPUT:

Submitted by Kajjayam Priya (Priya1414)
Download packets of source code on Coders Packet
Comments