Answer:
def main():
principal = float(input("Enter the amount of principal amount to be deposited: "))
rate = float(input("Enter annual interest rate paid by the account: "))
num = int(input("Enter the number of times per year that the interest is compunded: "))
years = float(input("Enter the number of years the account will be left to earn interest: "))
amount = principal*(1+(rate*.01)/num)**(num*years)
print("The amount of money will be in the account after ", years, "years:", round(amount,2))
main()
Explanation:
- Calculating the balance of the account after a specified number of years with the help of the formula:
- amount = principal*(1+(rate*.01)/num)**(num*years)
Answer:
Draw a text box
Explanation:
Because if she draw it she can edit and write what she want
Answer:
50-64
Explanation:
We know this because I said so
Answer:
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
The complete program calling the method is given in the explanation section
Explanation:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));
}
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
}
The maxMagnitude() method uses if/else statement to compare two ints and return the larger one