Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Variable Practice | Variables and Data Types
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C++ FOundations: V1

bookChallenge: Variable Practice

Taak

Swipe to start coding

Write a C++ program that does the following:

  • Declare an int variable and assign it a value.
  • Declare a double variable and assign it a value.
  • Declare a std::string variable and assign it a value.
  • Print all three variables to the console, each on a separate line.

Your program should contain a main function as the entry point. Use std::cout to print the variable values. Remember to include the necessary headers for using std::string and std::cout.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 3
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Variable Practice

Veeg om het menu te tonen

Taak

Swipe to start coding

Write a C++ program that does the following:

  • Declare an int variable and assign it a value.
  • Declare a double variable and assign it a value.
  • Declare a std::string variable and assign it a value.
  • Print all three variables to the console, each on a separate line.

Your program should contain a main function as the entry point. Use std::cout to print the variable values. Remember to include the necessary headers for using std::string and std::cout.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 3
single

single

some-alt