I can't do internship 6.3 in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I can't do internship 6.3 in Java

Please help me, I don’t understand how to write the code https://code.sololearn.com/cHxSaiffSj54/?ref=app

21st Dec 2021, 3:42 AM
Stranj
22 Answers
+ 2
This is a copy of my solution. I tested it and it passed the test. Copy and paste it to make sure you don't make typo errors. You could continue the lessons, but it would really be a good idea to start from the beginning. Debugging is an essential skill. Unless you can hire someone to do that for you, or for free, like in here...(+_+) https://code.sololearn.com/cMA6Jh7eASWP/?ref=app
24th Dec 2021, 7:20 AM
Bob_Li
Bob_Li - avatar
+ 5
I would like to see what you wrote.
21st Dec 2021, 5:34 AM
Solo
Solo - avatar
+ 5
System.out.println(pupils * pencils); You can pass it but it is meaningless if you did not understand it. Make sure you understand the concept of variables and how to use them. Do not just try to pass the tests without understanding why.
21st Dec 2021, 9:03 AM
Bob_Li
Bob_Li - avatar
+ 4
How can you not understand anything if you have already solved the problem. You just need to use variables instead of numbers and write a command to output the data.
21st Dec 2021, 5:58 AM
Solo
Solo - avatar
+ 4
Bro keep calm and send your code 3 things i have identified in your code is.... 1) no need of scanner class when you are not taking input from user 2 thing , you were passing "pensils" ... if you will pass in double quotes , it will return you a string ... instead of calculations.... so pass System.out.println(pensils); 3) closing curly brackets missing
22nd Dec 2021, 6:42 PM
Mridul Jaiman
Mridul Jaiman - avatar
+ 2
What should be done to find out the number of pencils?
21st Dec 2021, 4:18 AM
Solo
Solo - avatar
+ 2
We dlzhny to multiply 11 * 3 and to get 33 and I have the code written Does not work
21st Dec 2021, 5:25 AM
Stranj
+ 2
Seriously? The third day? I do not believe. Show all your efforts, I want to see it.
21st Dec 2021, 6:48 AM
Solo
Solo - avatar
+ 2
We know you are frustrated. Some replies may sound off-putting, but there have been a lot of people posting just for free solutions. And everybody here is trying to help you. That's why we reply. We could just ignore your post. But we replied. @Smith Welder already gave you the entire solution. Read the lesson again. Then read the problem. Make sure you understand what each line of code does. Then you will know why you only need to add System.out.println(pupils * students); in order to solve the problem. Why you tried those other things suggests that you did not understand the lesson or what the code already did and what the next line is expected to be. Do not guess. Learn at your own pace, but build a strong foundation. There is a lot more to learn and everything is built on top of those. It gets easier if you do it right. Otherwise it gets harder.
22nd Dec 2021, 3:07 AM
Bob_Li
Bob_Li - avatar
+ 1
There may be mistakes because I write with the help of a translator
21st Dec 2021, 5:52 AM
Stranj
+ 1
Thank you. but you can send the code from it does not work. please
21st Dec 2021, 12:39 PM
Stranj
+ 1
Sololearn lessons have internal codes that enters the values to test your solution. The codes provided have the proper inputs already. You just write the logic and print the output in the expected format. Testing is done automatically. So, in your example, you don't have to input 11 and 3. It is provided by the testing code to the inputs in your code.
26th Dec 2021, 6:26 AM
Bob_Li
Bob_Li - avatar
0
Stranj If there are 11 pupils with 3 pencils each, then the result = pupils * pencils. Make sure to identify the type of the result variable print result
21st Dec 2021, 4:38 AM
Rik Wittkopp
Rik Wittkopp - avatar
0
I cleared everything. You can write the code here, please. I don't get it at all
21st Dec 2021, 5:50 AM
Stranj
0
Write please. I have been changing the code for the third day, but it does not work
21st Dec 2021, 6:31 AM
Stranj
0
thanks a lot Спасибо большое
23rd Dec 2021, 10:19 AM
Stranj
0
Hello. The code you have is working but does not fit the task. try unlocking task 6.3 and make sure
24th Dec 2021, 4:43 AM
Stranj
0
Спасибо Thank you
26th Dec 2021, 4:38 AM
Stranj
0
But you know. what should be entered when the window exits before running the program
26th Dec 2021, 4:41 AM
Stranj
- 1
Won't try?!?! I say this is practice 6.3; I've changed the code so many times and returned it to its original state.I say something that doesn’t work. I put numbers in Int pencils = scaner(); System.out.println(""); Int pencils = 3; etc
22nd Dec 2021, 1:55 AM
Stranj