0% found this document useful (0 votes)
38 views

Java Exp 6

This Java program calculates simple interest given principal, time, and rate as command line arguments. It parses the command line arguments to the appropriate data types, performs the simple interest calculation of principal * time * rate / 100, and prints the result.

Uploaded by

Prasad Kalal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Java Exp 6

This Java program calculates simple interest given principal, time, and rate as command line arguments. It parses the command line arguments to the appropriate data types, performs the simple interest calculation of principal * time * rate / 100, and prints the result.

Uploaded by

Prasad Kalal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

/*Illustrate java program to expression evaluate using command line

arguments*/
class Si{

public static void main(String[] args)

float SI;

float p = Float.parseFloat(args[0]);

int t = Integer.parseInt(args[1]);

float r = Float.parseFloat(args[2]);

SI = (p*t*r)/100;

System.out.println("Simple Interest ="+ SI);

Output:

You might also like