🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

a=5, b=8, c=6 के लिए निम्नलिखित एल्गोरिदम का आउटपुट क्या होगा?

What will be the output of the following algorithm for a=5, b=8, c=6 ?

Step 1: Start
Step 2: Declare variables a,b and c.
Step 3: Read variables a,b and c.
Step 4: If a > b
                   If a > c
                          Display a is the largest number.
                   Else
                          Display c is the largest number.
             Else
                   If b > c
                          Display b is the largest number.
                   Else
                          Display c is the greatest number.
Step 5: Stop
A)
B)
C)
D)

Explanation:

Sure! Here's a simple explanation:

  • We are given a = 5, b = 8, and c = 6.
  • The algorithm first checks if a > b, but a (5) is not greater than b (8).
  • Since a is not greater than b, the algorithm moves to the else part, which checks if b > c.
  • Since b (8) is greater than c (6), it prints "b is the largest number".

Output: (A) b is the largest number

Latest Updates