

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
ຈົ່ງຂຽນຄຳສັ່ງຮັບຂໍ້ມູນຈາກແປ້ນພິມຂອງພາສາ C++
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
ຈົ່ງຂຽນຄຳສັ່ງສະແດງຜົນ output ຂອງພາສາ C++
Type answer...
7
Fill in the Blanks
ຈົ່ງຂຽນ operator (ຕົວນຳເນີນການ) output ຂອງພາສາ C++
Type answer...
8
Fill in the Blanks
ຈົ່ງຂຽນ operator (ຕົວນຳເນີນການ) input ຂອງພາສາ C++
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
Array Concepts using JAVA
Presentation
•
University
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
Popular Resources on Wayground
6 questions
PRIDE Always and Everywhere
Presentation
•
12th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
26 questions
KOR Review Kahoot Questions
Quiz
•
8th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
12 questions
Unit Zero lesson 2 cafeteria
Presentation
•
9th - 12th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
10 questions
Riddles Riddles fun Riddles
Quiz
•
6th - 12th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
Discover more resources for Computers
10 questions
Soup, Salad, or Sandwich?
Quiz
•
1st Grade - Professio...
20 questions
Disney Trivia
Quiz
•
University
8 questions
Extracted Quiz
Quiz
•
University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
67 questions
Unit 3 Random Questions
Quiz
•
11th Grade - University
64 questions
USHC 4 Key Terms 22-23
Quiz
•
11th Grade - University
12 questions
This or That...
Quiz
•
1st Grade - University
25 questions
Comma CFA
Quiz
•
6th Grade - University