0

how to solve project 2 in java Q2 is U take a loan from a friend and need to calculate how much u will owe him after 3 months.

13th May 2021, 8:43 PM
yitbarek mulugeta
yitbarek mulugeta - avatar
2 ответов
0
Hi! Please, show us your code attempt! Thx!
13th May 2021, 8:48 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); int i= 1; while(i<=3){ amount = amount -((amount*10)/100); ++i; } System.out.println(amount ); } }
9th Jan 2022, 8:39 PM
Sherwan Mulla
Sherwan Mulla - avatar