![yoridff](/avatars/23257.jpg)
yoridff
15.04.2020 •
Computers and Technology
Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percent simple interest for one year. Create a separate method to do the calculation and return the result to be displayed.
Solved
Show answers
More tips
- H Health and Medicine 10 Tips for Avoiding Vitamin Deficiency...
- F Food and Cooking How to Properly Cook Buckwheat?...
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- L Leisure and Entertainment Carving: History and Techniques for Creating Vegetable and Fruit Decorations...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- H Health and Medicine What vaccines do children need?...
- H Health and Medicine Reasons for the Appearance of Warts: Everything You Need to Know...
- A Art and Culture How to Learn Screaming: Step-by-Step Guide for Beginners...
- H Health and Medicine Contraceptive Pills After 35: The Importance Of Choosing The Right Medication...
- C Computers and Internet How to Choose a Monitor?...
Answers on questions: Computers and Technology
- C Computers and Technology In access, which of the defining characteristics of a database is met by the design view of a table?...
- C Computers and Technology Which best describes meiosis? It produces cells that are identical to the original cell.It is responsible for the replacement of damaged skin cells.It is responsible for growth...
- C Computers and Technology The dns record was developed to accommodate ipv6 addresses....
- C Computers and Technology The unique global address for a web page or other resource on the internet is called the...
- H History Thomas Jefferson considered all of the following important functions of government EXCEPT...
- M Mathematics WILL GIVE BRAINLIEST IF YOU USE LAW OF SINES CORRECTLY Please solve using the law of sines....
- S Social Studies The most-practiced religion in New Zealand is ....
- P Physics Electricity can occur naturally, or it can be harnessed by humans. Which of these is an example of naturally-occurring electricity?...
- C Chemistry I WILL GIVE YOU 10 POINTS IF YOU WRITE A SHORT ESSAY OF WHAT SELECTIVE BREEDING IS FIVE TO TEN SENTENCES. PLEASE ASAP...
- B Biology Overpopulation and increased demand on the water supply, lack of water conservation practices, and pollution of water sources can cause water to become scarce....
Ответ:
/* interest = principal amount * rate*time
Total amount = principal + interest
*/
See a java program with a method that implements the solution in the explanation section
Explanation:
public class num6 {
public static void main(String[] args) {
double capital = 5000;
int noYears = 1;
double intRate = 0.02;
System.out.println("Interest is "+simpleInterest(capital,noYears,intRate));
double totalAmount = capital + simpleInterest(capital,noYears,intRate);
System.out.println("Total Amount is "+totalAmount);
}
public static double simpleInterest(double capital, int timeInYears, double rateInPercentage){
double interest = capital*timeInYears*rateInPercentage;
return interest;
}
}
Ответ: