Computer Science, asked by chandrakirangr, 1 year ago

develop a program to calculate half-yearly interest in SB account in java.
i need the program quickly pls .
it can be any format ( if, switch .arrays)

Answers

Answered by pratikturkar306
0
import java.util.*;
public class FindingSI

public static void main(String args[])    
{       
Scanner scanner = new Scanner(System.in);       
System.out.println("Please enter principle amount :");       
float amount = scanner.nextFloat();       
System.out.println("Enter rate annually : ");       
float rate = scanner.nextFloat();       
float interest = calculate(amount, rate);       
System.out.println("Simple interested calculate by program is : " + interest);   

public static float calculate(float principle, float rate)   
{       
float interest = ((rate*1/2)*principle)/100;       
return interest;     
}
}
                                                            Peace..!!
Similar questions