

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
บทเรียนวิชาคอมพิวเตอร์พื้นฐาน
Presentation
•
KG
8 questions
CS 3 Lesson 2
Presentation
•
12th Grade
6 questions
Intro to HCI
Presentation
•
University
7 questions
Database Application Lifecycle
Presentation
•
University
8 questions
HÁLÓZAT_Tananyag_SSH&Telnet
Presentation
•
University
9 questions
Pertemuan 1: Aplikasi Komputer
Presentation
•
University
9 questions
Problem Solving in Programming
Presentation
•
12th Grade - University
10 questions
Array Concepts using JAVA
Presentation
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade