- 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
13 Réponses
- 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);
}
}
+ 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
+ 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
+ 2
Please read this first before posting a question 👍
https://www.sololearn.com/Discuss/333866/?ref=app
+ 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.
+ 1
Please edit the thread following the guide linked in my previous reply. It will help improve your chances for answers.
0
Ok thanks
0
Ok sir thanks
- 1
This is the questions and the program please what should i format
- 2
Can someone answers this please
- 2
Ok what to do now because I don't understand the questions
- 2
Ok but please am not yet getting the answers
- 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