- 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
7 odpowiedzi
+ 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 .
+ 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
+ 1
x = 24
y = x -12 = 24 - 12 = 12
+ 1
You're welcome
0
i am kind of new here any help would be gladly appreciated.
0
@dolphin i tried 24 but still it dosent go green in the fill in the blanks i dont know why ??
0
@dolphin Thanks for the help dude your solution worked i dont know why couldnt i think of it earlier.