Stuck in this please provide you assistance friend | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Stuck in this please provide you assistance friend

Fill in the blanks to print the sum of the two variables. int x = 2; int y = 4; int result = x _ _; System.out.println(_____);

24th Dec 2019, 1:09 PM
jitendra suthar
jitendra suthar - avatar
3 Answers
+ 1
+y result You were stuck at this??
24th Dec 2019, 1:18 PM
Avinesh
Avinesh - avatar
0
Same as Simple arithmatics. How do you add two numbers 2, 4? as 2+4, so taking x=2,y=4, and to store added result storing in another variable result. here, int result=x+y; so result contains 2+4=6 Printing by System.out.println (result) ;
24th Dec 2019, 1:26 PM
Jayakrishna 🇮🇳
0
Thank you JayaKrishna and Avinash
24th Dec 2019, 1:43 PM
jitendra suthar
jitendra suthar - avatar