Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen User Input | Variables
Introduction to C++ | Mobile-Friendly
course content

Kursinhalt

Introduction to C++ | Mobile-Friendly

Introduction to C++ | Mobile-Friendly

1. Basics
2. Variables
3. Conditional Statements
4. Loops
5. Intro to Arrays

book
User Input

We already know how to output the data with the object cout and operator <<. However, sometimes we need to get values directly from the user. To enable this operation use cin in combination with the extraction operator >>.

For example, here we want to get the value for the variable a and output it:

In the line #12 the user print the value which will be stored in the variable a.

question mark

Which line should be used to get the user input and store it in the variable x?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 3

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

course content

Kursinhalt

Introduction to C++ | Mobile-Friendly

Introduction to C++ | Mobile-Friendly

1. Basics
2. Variables
3. Conditional Statements
4. Loops
5. Intro to Arrays

book
User Input

We already know how to output the data with the object cout and operator <<. However, sometimes we need to get values directly from the user. To enable this operation use cin in combination with the extraction operator >>.

For example, here we want to get the value for the variable a and output it:

In the line #12 the user print the value which will be stored in the variable a.

question mark

Which line should be used to get the user input and store it in the variable x?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 3
some-alt