Can somebody help me with this please? It's so frustrating to find where i should put in the parentheses.
You can give a hint, or even an answer, thank you in advance.
Can somebody help me with this please?
Resolved
Comments (11)
- Popular
- New
- Old
You must be signed in to leave a comment
Robin Singh Chauhan
30 July 2019, 18:29
System.out.println(2 * (3 + 4 * (5 + 6 * 7))); this is the answer!!!!
0
Ayushi Khare
15 September 2019, 09:09
thanks!
0
Robin Singh Chauhan
30 July 2019, 18:05
The main problem is (2*(3+4*(5+6*7))) is that u have 1 open parenthesis but 3 ending and u need 2 in front and 2 in end
0
Kedar Hargude
23 August 2019, 06:46
The outer one, which encompasses the whole doesn't count as parenthesis...so your solution is right. You've got 2 in the front and 2 in the end
0
Jeff
23 July 2019, 22:00solution
It may seem like there's only a few places to put the parenthesis, but you can put them around more than two variables, and you can put them inside other parenthesis.
+2
MajkiExpert
20 July 2019, 14:40useful
Here you have solution
System.out.println(2 * (3 + 4 * (5 + 6 * 7)));
+3
Hoàng Trần
22 July 2019, 03:45
Thank you so much that helped me a lot <3
0
Hoàng Trần
22 July 2019, 03:45
but can you tell me how you got the answer ?
0
MajkiExpert
23 July 2019, 17:55
just testing :)
0
Hedaet HR Rahman
20 July 2019, 11:33
package com.codegym.task.task02.task0201;
/*
Implement the print method
*/
public class Solution {
public static void main(String[] args) {
print("Java is easy to learn!");
print("Java opens many opportunities!");
}
public static void print(String s) {
//write your code here
for(int i = 0; i < 4; i++){
System.out.println(s);
}
}
}
0
Hoàng Trần
20 July 2019, 11:45
oh no it's not the question i asked about!!!
This is my question, but thanks anyway bro <3
0