How to take input from user
Duration: 8 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Quantitative Ability: Percentage, Profit and Loss, Ratio and Proportion (Ratios), Average, Time and Work, Speed Time and Distance, Simple Interest and Compound Interest, Age Problems, Number System, Divisibility Rules, HCF LCM, Algebra, Permutation and Combination, Probability, Data Interpretation, Logarithm, Sequence and Series (Series), Powers and Exponents (Surds and Indices), Speed Mathematics and Basic Mathematics
- Logical Reasoning: Seating Arrangements, Puzzle Solving (Puzzles), Data Arrangement, Coding Decoding, Blood Relations, Directions (Direction Test), Ranking, Order and Sequence, Data Sufficiency, Venn Diagram, Inequality, Series (Number and Letter Series) (Numerical Relations and Reasoning), Logical Sequence Of Words, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Selection Decision Table (Decision Making), Analogy, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning)
- Verbal Ability: Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Subject Verb Agreement (Verb Noun Agreement), Tenses, Articles, Preposition, Conjunction, Modals, Active Passive Voice (Voice), Direct and Indirect Speech, Vocabulary, Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Sentence Completion (Fill in the blanks), Sentence Correction (Error Correction), Cloze Test (Cloze Passage), Facts, Inference and Judgements
- Programming Fundamentals (Technical): C Fundamentals
- Data Structures (Technical): Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
- Algorithms (Technical): Algorithm Analysis, Sorting Algorithms, Greedy Algorithms, Dynamic Programming, Minimum Spanning Trees, Shortest Path Algos, Time Complexity Analysis, Advanced Algorithms
- OOPs (Technical): Object Oriented Programming (OOPS)
- DBMS (Technical): Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, Relational Calculus, Transaction Management, Concurrency Control, Database Recovery, ORDBMS, Database Security & Authorization, Query Processing & Optimization, Enhanced Data Models, Data Warehousing & Mining, Big Data Systems, NoSQL
- SQL (Technical): SQL
- Operating Systems (Technical): Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Deadlock, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management, Windows OS, Linux OS, Security, Distributed Systems, Virtual Machines
- Computer Networks (Technical): Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Security, Cloud Computing and IoT, Cyber and Info Security
- Software Engineering (Technical): Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
- Coding/Automata Round: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java, Python for Placements by Yash Sir, Pseudo Codes
- Personality / Behavioral Assessment: Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
- Writing Assessment: English Writing Ability
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This educational video is a C++ programming tutorial that demonstrates how to write a program to calculate the square of a number. The instructor begins by showing a basic C++ program in an online IDE, which includes the necessary header files and the main function. The initial code uses a hardcoded value for the number, but the instructor then modifies it to accept user input using the cin statement. The program is executed with different inputs, such as 5 and 10, to show the output. The tutorial then transitions to a more advanced example, where the program calculates a number raised to a power, requiring the user to input both the base and the exponent. The instructor also shows how to use the pow() function from the math.h library to perform this calculation. The video includes a brief interlude where the instructor searches for the formula for the area of an equilateral triangle, which is presented as a visual aid. The overall teaching style is practical and hands-on, focusing on writing, modifying, and running code in real-time.
Chapters
0:00 – 2:00 00:00-02:00
The video opens with a C++ code editor displaying a program to calculate the square of a number. The code includes the necessary headers #include <iostream> and using namespace std; and defines the main function. The instructor explains the structure of a C++ program. The initial code has a float variable x initialized to 5, and it prints the square of x. The instructor then modifies the code to prompt the user to enter a number, using cout to display "Enter Number:" and cin to read the input into the variable x. The output statement is updated to print the square of the entered number. The instructor runs the program, and the console output shows the result for the input 5, which is 25. The instructor also mentions that the program can be run with different values, such as 10, to get the square of 100.
2:00 – 5:00 02:00-05:00
The instructor continues to demonstrate the C++ program for calculating the square of a number. The code is shown with the variable x initialized to 10, and the program is run to show the output of 100. The instructor then modifies the code to use the pow() function from the math.h library to calculate the square, which is shown as pow(x,2). The instructor explains that this method is more flexible for calculating powers other than 2. The video then transitions to a new topic, showing a Google search for the formula of the area of an equilateral triangle. The formula A = (√3/4) * a² is displayed, along with a diagram of the triangle. The instructor uses this as an example to illustrate how to apply the concept of calculating powers in a real-world scenario, such as calculating the area of a triangle with a given side length.
5:00 – 8:18 05:00-08:18
The video returns to the C++ code editor, where the instructor demonstrates a more advanced program to calculate a number raised to a power. The code includes the necessary headers, including #include <math.h>. The program prompts the user to enter a number and a power, and then calculates the result using the pow() function. The instructor shows the code being written and executed, with the console output displaying the result of 5 raised to the power of 4, which is 625. The instructor explains that this method is more efficient than manually multiplying the number by itself multiple times. The video concludes with the instructor summarizing the key concepts covered, including how to take user input, perform calculations, and use the pow() function in C++.
The video provides a comprehensive, step-by-step tutorial on C++ programming, starting with the basics of writing a program to calculate the square of a number and progressing to more advanced concepts like user input and using the pow() function. The instructor uses a practical, hands-on approach, demonstrating code modifications and running the program to show the results. The inclusion of a real-world example, the area of an equilateral triangle, helps to contextualize the mathematical operations. The overall lesson emphasizes the importance of understanding the structure of a C++ program, how to interact with the user, and how to use built-in functions to perform complex calculations efficiently.

