import java.util.Scanner; public class Interest { @SuppressWarnings("resource") public static void main(String[] args) { Sc | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

import java.util.Scanner; public class Interest { @SuppressWarnings("resource") public static void main(String[] args) { Sc

1. Identify whether it is a Java or python. 2. Identify the data types used. 3. How many lines do the work of processing? 4. Write out the correct output of the codes. 5. What is the significance of the use of {and} in the codes. 6. What is the role of sign + used in the program

30th Nov 2020, 6:57 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
13 Answers
- 4
import java.util.Scanner; public class Interest { @SuppressWarnings("resource") public static void main(String[] args) { Scanner input = new Scanner(System.in); double principal = 0; double rate = 0; double time = 0; double simpleInterest = 0; System.out.print("Enter the Principal amount : "); principal = input.nextDouble(); System.out.print("Enter the Rate : "); rate = input.nextDouble(); System.out.print("Enter the Time : "); time = input.nextDouble(); simpleInterest = (principal * rate * time) / 100; System.out.println(""); System.out.println("The Simple Interest is : " + simpleInterest); } }
30th Nov 2020, 7:34 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
+ 3
I was referring to your original post (one above) when I said format, I was asking you to edit it accordingly to the format as the guidelines recommends (linked earlier). Let this be noted that ... 1. We don't put codes in question title. 2. We use proper tags to specify and clarify context of relevant language and/or subjects. 3. When we have a code in question, we save copy of code in SoloLearn, and attach its link inside Description. It helps to prevent your code from getting truncated. Incomplete code is hard to analyse. https://www.sololearn.com/post/75089/?ref=app
30th Nov 2020, 7:49 AM
Ipang
+ 3
About your question ... 1. Identify whether it is a Java or python. I see you joined Java and Python courses here, so I'm sure you know. 2. Identify the data types used. As I see it, only `double` is used in calculations. 3. How many lines do the work of processing? "processing" here is vague, it's unclear whether it includes input reading parts or not. 4. Write out the correct output of the codes. It is contextual, depends on inputs. 5. What is the significance of the use of {and} in the codes. You have completed both Java and Python courses, you must have understood what { and } are. 6. What is the role of sign + used in the program Same answer with point #5
30th Nov 2020, 7:59 AM
Ipang
+ 2
Please read this first before posting a question 👍 https://www.sololearn.com/Discuss/333866/?ref=app
30th Nov 2020, 7:00 AM
Ipang
+ 2
Yes, I can see that. But if you don't do anything to better your post format, then it's not gonna get any either.
30th Nov 2020, 7:23 AM
Ipang
+ 1
Please edit the thread following the guide linked in my previous reply. It will help improve your chances for answers.
30th Nov 2020, 7:13 AM
Ipang
0
Ok thanks
30th Nov 2020, 7:54 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
0
Ok sir thanks
30th Nov 2020, 8:08 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
- 1
This is the questions and the program please what should i format
30th Nov 2020, 7:35 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
- 2
Can someone answers this please
30th Nov 2020, 6:59 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
- 2
Ok what to do now because I don't understand the questions
30th Nov 2020, 7:10 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
- 2
Ok but please am not yet getting the answers
30th Nov 2020, 7:19 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar
- 2
1. Identify whether it is a Java or python. 2. Identify the data types used. 3. How many lines do the work of processing? 4. Write out the correct output of the codes. 5. What is the significance of the use of {and} in the codes. 6. What is the role of sign + used in the program
30th Nov 2020, 7:33 AM
Tiamiyu Toheeb
Tiamiyu Toheeb - avatar