In this example, we will learn to calculate the simple interest and compound interest in Java. To understand this example, you should have the knowledge of the following Java programming topics:. In the above example, we have used the Scanner class to take principal , rate , and time as input from the user. We then use the formula of simple interest to compute the simple interest. In the above example, we have used the formula of compound interest to calculate the compound interest. Here, we have used the Math.
C program to calculate electricity bill
OMNeT++ - Simulation Manual
Red Legs was without a doubt the luckiest pirate, since he was able to retire a wealthy man after starting life as a slave. The second luckiest was Sir Henry Morgan — was a Welsh privateer, pirate and admiral of the English Royal Navy who made a name for himself during activities in the Caribbean, primarily raiding Spanish settlements. He earned a reputation as one of the most notorious and successful privateers in history, and one of the most ruthless among those active along the Spanish Main. There was no record of Morgan before This gave him a lot of pull in getting assigned as captain of a ship and later as Vice-Admiral of a privateer fleet. Morgan is mainly known for raiding and looting Spanish settlements, including Panama. Although Panama was a rich city, Morgan and his men obtained far less plunder than they had expected.
How to calculate CAGR (compound annual growth rate) in Excel - formula examples
Here we will write a program to compute simple interest and compound interest. First, we will calculate the simple interest and later we will calculate compound interest. Program description:- Write a program to calculate simple interest by accepting the principle amount, time and rate values. We can take variables name as p , t , and r for the principal amount, time, and rate respectively for a better understanding purpose. Enter principal amount p , time t and rate r values: 60 3.
This program will calculate the value of the SI where the principal, rate and the time is given by the user. So first of all, you have to include the stdio header file using the "include" preceding which tells that the header file needs to be process before compilation, hence named preprocessor directive. There is also another header file conio. Then you have to define the main function and it has been declared as an integer so by default it returns the integer.