5 Matching Annotations
  1. Nov 2021
    1. 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.

    1. 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).

    1. 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>

    2. 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.

    1. 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.