

C++ User Input
Presentation
•
Computers
•
University
•
Hard
Kittisay SENGTHONG
FREE Resource
5 Slides • 5 Questions
1
C++ User Input
ຄຳສັ່ງຮັບຂໍ້ມູນຈາກແປ້ນພິມ

2
C++ User Input
You have already learned that cout is used to output (print) values. Now we will use cin to get user input.
cin is a predefined variable that reads data from the keyboard with the extraction operator (>>).
In the following example, the user can input a number, which is stored in the variable x. Then we print the value of x:
3
Fill in the Blanks
Type answer...
4
Example
C++ User Input
5
Good To Know
cout is pronounced "see-out". Used for output, and uses the insertion operator (<<)
cin is pronounced "see-in". Used for input, and uses the extraction operator (>>)
6
Fill in the Blanks
Type answer...
7
Fill in the Blanks
Type answer...
8
Fill in the Blanks
Type answer...
9
Creating a Simple Calculator
In this example, the user must input two numbers. Then we print the sum by calculating (adding) the two numbers:
10
Poll
ໃຫ້ຄະແນນຄວາມຍາກຂອງຫົວຂໍ້ User Input
ງ່າຍ
ທຳມະດາ
ຍາກ
ຍາກຫຼາຍ
C++ User Input
ຄຳສັ່ງຮັບຂໍ້ມູນຈາກແປ້ນພິມ

Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
5 questions
การออกแบบกราฟิก
Presentation
•
University
7 questions
Python
Presentation
•
University
8 questions
messor review
Presentation
•
University
9 questions
Preparing Your Strategies for TTS2233
Presentation
•
University
9 questions
MEDIA PEMBELAJARAN
Presentation
•
University
11 questions
Evaluating Expressions
Presentation
•
University
11 questions
Digital Literacy
Presentation
•
Professional Development
5 questions
Planung Aufbau und Konfiguration 1b
Presentation
•
KG - University
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
15 questions
LGBTQ Trivia
Quiz
•
University
36 questions
8th Grade US History STAAR Review
Quiz
•
KG - University
25 questions
5th Grade Science STAAR Review
Quiz
•
KG - University
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
20 questions
5_Review_TEACHER
Quiz
•
University
10 questions
Applications of Quadratic Functions
Quiz
•
10th Grade - University
10 questions
Add & Subtract Mixed Numbers with Like Denominators
Quiz
•
KG - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...