Answer:
public static int powOfTwo(int input) {
return input*input;
}
You will have to call this method in main
for printing it, write
System.out.println(powOfTwo(your number));
in public static void main(str[]args) {
}
Credit cards. You pay interest when you use them
B- Copyright laws protect original works both online and in print.
Code:
def interest():
interest_rate = 0.06
investment = input(int('Investment: '))
yield = 0
year = 0
while (yield < investment):
year += 1
yield = investment * interest_rate
print (year)
NOTE: i wrote this code assuming that the investment for the next year is the same as the first year and so forth