

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
10 questions
BMC DESIGN - Customer Insight
Presentation
•
University
7 questions
Pengantar PLC
Presentation
•
University
9 questions
Cloud Storage Quiz
Presentation
•
University
10 questions
Kuis Digital Marketing
Presentation
•
University
7 questions
Tugas H2 NIRWANA,S.Pd
Presentation
•
12th Grade
9 questions
Pengenalan Hardware Komputer
Presentation
•
12th Grade
9 questions
ICT SKILLS chapter 1
Presentation
•
12th Grade
8 questions
Example
Presentation
•
University
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
40 questions
8th Grade Math Review
Quiz
•
8th Grade - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
14 questions
Superhero
Quiz
•
1st Grade - University