+ 1
I've issue to solving loop project - loan calculator need help. Question available in description.
You take a loan from a friend and need to calculate how much you will owe him after 3 months. You are going to pay him back 10% of the remaining loan amount each month. Create a program that takes the loan amount as input, calculates and outputs the remaining amount after 3 months. Sample Input: 20000 Sample Output: 10628 Here is the monthly payment schedule: Month 1 Payment: 10% of 20000 = 2000 Remaining amount: 18000 Month 2 Payment: 10% of 18000 = 1800 Remaining amount: 16200 Month 3: Payment: 10% of 16200 = 1620 Remaining amount: 14580
5 odpowiedzi
0
Check this one
+ 5
Prince Chouhan ,
before we can help you, you should show us your attempt first. if you have not done a try by yourself upto now, please do so. Put your code in playground and link it here.
thanks!
+ 1
Lothar ,
check this code
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int amount = scanner.nextInt();
//your code goes here
int months= 3;
for(int i= 0 ; i < months; i++)
amount= amount *90/100;
System.out.println(amount);
}
}
}
+ 1
Lothar
Thanks i just solved it i did mistake
Adding extra } ON THE PROGRAM
0
> FOLKWIN EXPERT RECOVERY A RELIABLE TEAM SET TO RECOVER ALL LOST CRYPTO ASSET.
Tapestry of life, amidst the certainties of death and taxes, there emerges a steadfast beacon of hope: > FOLKWIN EXPERT RECOVERY. When the tide of misfortune swept away my savings in the currents of fraudulent financial institutions, it was > FOLKWIN EXPERT RECOVERY who extended their guiding hand, leading me from the depths of despair to the shores of financial redemption. Having fallen victim to an investment platform's deceitful schemes, I found myself adrift in a sea of uncertainty, with nowhere else to turn but to > FOLKWIN EXPERT RECOVERY. With unwavering resolve, they embarked on a mission to reclaim what was rightfully mine, breathing life into my shattered dreams. In less than 2 days, > FOLKWIN EXPERT RECOVERY orchestrated a miraculous feat, restoring my lost USDT funds of $56,400.033 to their rightful place. With tears of gratitude streaming down my cheeks, I beheld the culmination of their efforts, a testament to their unwavering commitment to their client's well-being. The impact of their intervention extended far beyond the realm of finances, touching the very core of my existence. No longer shackled by the chains of financial destitution, I found myself empowered to fulfill my responsibilities as a parent. With the weight of uncertainty lifted from my shoulders, I could finally afford to provide my two daughters with the gift of education, paying their college tuition fees with newfound ease. But > FOLKWIN EXPERT RECOVERY'S impact transcends mere monetary restitution; it is their ethos of professionalism, transparency, and empathy that sets them apart. Throughout the recovery process, they exuded a rare blend of expertise and compassion, guiding me through the intricacies of financial recovery with patience and understanding. At every step of the journey, they provided clear and concise updates, ensuring that I was fully informed and empowered to make informed decisions. Email: Folkwinexpertrecovery @ tech-center DOT com