- Nov 2021
-
csawesome.runestone.academy csawesome.runestone.academy
-
V = (4/3)(pi)(r^3)
Please correct the code.... The formula is right but the correct solution is wrong. Correct solution for this exercice :
double volume = (4.0/3) pi radius * radius;
Missing a radius in the calculus.
-
-
csawesome.runestone.academy csawesome.runestone.academy
-
What is the value of letter if letter = 'c' + 3?
You should have indicate that the variable letter is a char. The character 'c' is always converted into an int then the 3 is added (which give 102).
-
-
csawesome.runestone.academy csawesome.runestone.academy
-
Fix the code below so that it runs without errors. Hint: you might need to change the names of some variables.
Be carefull ! Here, you have to add the line below just before the line "int main() {" :
#include <iostream>
-
Click on all keywords.
The word cout, in this context, is becomed a keyword for using the include <iostream>. You can't create a variable with the name cout in this program.
-
-
csawesome.runestone.academy csawesome.runestone.academy
-
The answer of this question is incorrect. The code below compile because of the numerical promotion of the char '3' to an int. The program will display the char 'y' without any errors.
-