- 1

fill in the missing parts in the code to print 12?

int x = 24; int y; y= -12; cout << y << endl ; i put y = 24 - 12 and it is the right answer but still it shows incorrect answer i even tried running the code on c++ shell and it printed the 12 but for some reason it dosent work here what should i do i cant continue my course without learning this step somebody plzz help

24th Apr 2021, 9:53 PM
tech sicx
tech sicx - avatar
7 Antworten
+ 3
tech sicx sl quizzes are limited to one answer . these were designed to have only one answer (static). In this you are also right. But in this case you have to use x which is 24 .
24th Apr 2021, 10:10 PM
TOLUENE
TOLUENE - avatar
+ 2
put x itself which here equal to 24 u shouldn't put the value of variable x which equal to 24 y = x -12
24th Apr 2021, 10:05 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
x = 24 y = x -12 = 24 - 12 = 12
24th Apr 2021, 9:59 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
You're welcome
24th Apr 2021, 10:10 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
0
i am kind of new here any help would be gladly appreciated.
24th Apr 2021, 9:56 PM
tech sicx
tech sicx - avatar
0
@dolphin i tried 24 but still it dosent go green in the fill in the blanks i dont know why ??
24th Apr 2021, 10:02 PM
tech sicx
tech sicx - avatar
0
@dolphin Thanks for the help dude your solution worked i dont know why couldnt i think of it earlier.
24th Apr 2021, 10:09 PM
tech sicx
tech sicx - avatar