Find maximum of 3 numbers

Duration: 3 min

This video lesson is available to enrolled students.

Return to /learn/CAPGEMINI-PREPARATION/pseudo-code/coding-questions/coding-question/asset-find-maximum-of-3-numbers after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. English Communication: Communication Assessment, English Writing Ability, Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions)
  2. Artificial Intelligence (AI Literacy): AI & ML by Arun Sir
  3. Programming, Logic & Problem Solving (Technical Assessment): Language Design, Pseudo Codes
  4. DSA (Technical Assessment): Introduction to DS, Array, Stack, Queue, Linked List
  5. Software Engineering (Technical Assessment): Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
  6. OOPs (Technical Assessment): Object Oriented Programming (OOPS)
  7. DBMS (Technical Assessment): 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, Database Security & Authorization, Data Warehousing & Mining, NoSQL
  8. SQL (Technical Assessment): SQL
  9. Networking (Technical Assessment): Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Security
  10. Modern Engg Awareness (Technical Assessment): Emerging Tech Trends, Cyber and Info Security
  11. Debugging Assessment: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java
  12. Cognitive Assessment: Gamified / Game Based Aptitude, Seating Arrangements, Puzzle Solving (Puzzles), Data Arrangement, Blood Relations, Directions (Direction Test), Coding Decoding, Series (Number and Letter Series) (Numerical Relations and Reasoning), Logical Sequence Of Words, Ranking, Order and Sequence, Data Sufficiency, Inequality, Venn Diagram, Syllogisms, Cubes & Dices, Calendar, Clock, Analytical Reasoning (Counting Figures Reasoning), Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Selection Decision Table (Decision Making), Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
  13. HR Interview: MR & HR Interview Preparation
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This video is a programming tutorial from Knowledge Gate Eduventures, focusing on solving the problem of finding the greatest of three numbers using C programming. The instructor first presents the problem statement, which includes input and output specifications and a public test case with inputs 12, 8, 47 and expected output 47. The core of the lesson is a step-by-step walkthrough of a C code solution. The code, displayed on a digital blackboard, uses the `#include <stdio.h>` header and a `main()` function. It declares three integer variables `a`, `b`, and `c`, and a variable `max` to store the result. The program reads the three numbers using `scanf`. The logic to find the maximum is implemented with a series of `if-else` statements: it first compares `a` and `b` to determine the larger of the two, storing the result in `max`. It then compares this `max` value with `c` to find the overall greatest number. Finally, the program prints the value of `max`. The instructor uses the blackboard to illustrate the logic flow, writing out the variables and the step-by-step comparison process, including a hand-drawn example with the values 10, 12, and 14 to demonstrate how the logic works.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The video begins with the 'KNOX MEEHEGATF' logo, which is a stylized version of 'KNOWLEDGE GATE'. It then transitions to a slide showing the 'KNOWLEDGE GATE' brand and its social media handles for various educational streams like 'KG GATE & PLACEMENT PREP', 'KG CODING', and 'KG UGC NET COLLEGE PREP'. The main content starts with a problem statement for 'Q7: Find out greatest of 3 numbers (3 numbers are not equal)'. The problem specifies the input format as three integers separated by space and the output as the greatest number. A public test case is provided: Input: 12 8 47, Output: 47. The instructor, Yash Jain Sir, is visible in a small window, and the video is marked as proprietary content of KNOWLEDGE GATE EDUVENTURES.

  2. 2:00 – 2:45 02:00-02:45

    The video displays a C code solution on a digital blackboard. The code begins with `#include <stdio.h>` and defines the `main()` function. Inside, it declares variables `int a, b, c, max;`. The `scanf("%d %d %d", &a, &b, &c);` function reads the three integers. The logic to find the maximum is implemented with `if (a > b)` to compare the first two numbers, setting `max = a` if true, otherwise `max = b`. Then, `if (c > max)` compares the third number with the current maximum, updating `max = c` if true. Finally, `printf("%d", max);` prints the result. The instructor uses the blackboard to draw the logic flow, writing 'a b c' and demonstrating the comparison process with the values 10, 12, 14, showing how `max` is updated step-by-step.

The video provides a clear, structured tutorial on a fundamental programming problem. It follows a logical progression from problem definition to implementation. The instructor first establishes the problem's requirements, then presents a complete C program. The core of the lesson is the explanation of the algorithm, which uses sequential conditional checks to find the maximum value. The visual aid of the digital blackboard, with handwritten annotations and a step-by-step walkthrough of the logic, effectively reinforces the concept of using `if-else` statements to compare multiple values, making the solution easy to understand and replicate.

Loading lesson…