Menu
Coddy logo textTech

Recap - Initialize Variables

Part of the Fundamentals section of Coddy's C++ journey — lesson 13 of 74.

challenge icon

Challenge

Beginner

Write a C++ code that initializes the following variables:

  • k with the value 88
  • PI with the value 3.14
  • name with the value "bob"

Make sure you use the exact variables names and values. Remember, C++ is case sensitive!

Try it yourself

#include <iostream>
#include <string>

int main() {
    // Type your code below

    
    // Don't change the lines below
    std::cout << "k = " << k << std::endl;
    std::cout << "PI = " << PI << std::endl;
    std::cout << "name = " << name << std::endl;
    return 0;
}

All lessons in Fundamentals