

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
6 questions
Agile: XC
Presentation
•
University
10 questions
Unit 3- Set 3
Presentation
•
KG - University
10 questions
TIA_Micro1 : Chapter 2/10
Presentation
•
KG - University
11 questions
Equality and Diversity
Presentation
•
University
5 questions
INFORMATIKA
Presentation
•
12th Grade
6 questions
CHAMPS/PBIS meeting
Presentation
•
Professional Development
5 questions
Gender & Society
Presentation
•
University
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade