Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
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(_____);
3 Antworten
+ 1
+y
result
You were stuck at this??
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) ;
0
Thank you JayaKrishna and Avinash