Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

s 14 marks] Consider the program below 1 import java.util public class PandI public static void main (Stringt) arga) // ?ntro Syatem.out.printin(Inin INTEREST CALCULATOR) //

image text in transcribed

image text in transcribed

s 14 marks] Consider the program below 1 import java.util public class PandI public static void main (Stringt) arga) // ?ntro Syatem.out.printin("Inin INTEREST CALCULATOR") // initialize input Scanner Scanner stdin new Scanner (System.in) 9 10 Dyst an out.printinnruprai 1oan i intatass // Get principal: System.out.printlnINPUT System.out.print(" Amount b Loan (in ) double principal- stdin.nextDouble () System.out.print(" Annual Interest (in ) double interest stdin.nextDouble) 12 13 15 16 17 // Convert from annual interest to daily interest interest /je 100.0 / 3652 18 19 20 21 // add interest to principal for each day of a year double yearEnd principal; 23 24 25 26 27 28 29 30 31 32 for (int i 0i 365; i++) yearEnd yearEnd yearEnd interest: System . out . printf ( "Original-82.2f ", principal) System.out.printf ("Amount Owing 2.2fIn", yearEnd) : System . out . printf ("Interest Cost %2.2f" (yearEnd principal)): The program was compiled using "javac Pandl.java" and produced the following errors: PandI.java:12: error: illegal character PandI.java:12: error' expected PandI.java: 12: error: illegal start of expression PandI. java: 12: error: unclosed string literal system.out.printin (InINPUT: " System.out.printin (InINPUT: ") System.out.printin (InINPUT: ") System. out.print1n ( INPUT:" continued on next page Page 4 of 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

Have issues been prioritized?

Answered: 1 week ago

Question

d. How will lack of trust be handled?

Answered: 1 week ago

Question

Are the rules readily available?

Answered: 1 week ago