This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("Total amount person receive after " + time + " year" + ": " + totalAmountToReceive);
}
}
```
#### Output
```text
Enter the principle amount : 1500
Enter the rate of interest(per annum): 8
Enter the time period(y): 5
Simple Interest: 600.0
Total amount person receive after 5 year: 2100.
```
To Calculate Simple interest ,
```SimpleInterest = (P*R*T)/100```
here, P = principleAmount
R = Rate of interest (%)
T = Time Period (per annum),
We need to take user input for following (P,R,T) and then apply the formulae using ```*,/``` operator. And then, print the output to user's terminal using ```println()``` funciton.
<TipInfo>
Don't know how to take input from the user ? Look at [this examples](/docs/basic-input-output#java-input)
Here two input numbers are taken from user one after another with space in between them which distinguish between two different inputs, this useful behavior is because of the default settings of Scanner called as Delimiter, [learn more here](https://www.javatpoint.com/post/java-scanner-delimiter-method).
</TipInfo>
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add java program to calculate Simple Interest #564
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add java program to calculate Simple Interest #564
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing