(Computer Science) | Problem Solving Ep.3 - แก้ไขปัญหา เงื่อนไข 1 ทางเลือก (if) [นักศึกษาปี 1]
T4RDev・1 minute read
Today's lesson covers coding under the condition of Eve using C or C language, with two problems presented by the teacher for practice. The first problem requires reading and comparing values of variables a and b to execute a specific condition, while the second problem focuses on checking if a received number is greater than 0 and displaying a message without arithmetic operations.
Insights
- In today's lesson, the teacher presented two problems related to coding in C language, focusing on tasks like comparing values stored in variables and executing specific conditions based on the comparison results.
- The lesson emphasized practical application by requiring students to input values from the keyboard, showcasing real-world scenarios where coding skills are essential for decision-making processes.
Get key ideas from YouTube videos. It’s free
Recent questions
How is the lesson structured?
Sequentially presented with two problems in C language.
What are the tasks in the first problem?
Reading, comparing values, executing specific condition in C.
What is the focus of the second problem?
Checking if received number is greater than 0.
How are the problems presented by the teacher?
Departure from usual single problem format.
What is the significance of input in the lesson?
Input taken from keyboard for variables a and b.
Related videos
Summary
00:00
"Working under Eve conditions in C"
- The topic of today's lesson is working under the condition of Eve, to be coded in C or C language.
- Two problems are presented by the teacher, a departure from the usual single problem format.
- The first problem involves reading values stored in variables a and b, comparing them, and executing a specific condition if a is greater than b.
- The code for this problem is written in C language, starting with including the necessary library and setting integer variables for a, b, and the result.
- Input is taken from the keyboard for variables a and b, followed by a comparison condition and the subsequent display of values and results.
- The second problem involves checking if a received number is greater than 0 and displaying a message accordingly, without any arithmetic operations involved.




