GATE Exam  >  GATE Questions  >   Consider a case in which A and B are been co... Start Learning for Free
Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal program
While A < /> B do
if A < b="" />
A : = A – B
else
B : = B – A;
Write(A);
  • a)
    Find’s out factorial of two number
  • b)
    Find’s out remainder of two number
  • c)
    Find’s out GCD of two numbers
  • d)
    Find’s out Fibonacci series in range from A to B
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider a case in which A and B are been considered as non zero +ve ...
We need to apply Optional Elimination
Taking A = 6 AND B = 4
Case it’s GCD when GCD = 2
Now dry run the code
1 → A = 2, B = 4
2→ A = 2, B = 2
Prints A which is 2 which means it’s a GCD
View all questions of this test
Explore Courses for GATE exam

Similar GATE Doubts

Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer?
Question Description
Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer?.
Solutions for Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a case in which A and B are been considered as non zero +ve integers, then find out the outcome of following Pascal programWhile A B doif A A : = A – BelseB : = B – A;Write(A);a)Find’s out factorial of two numberb)Find’s out remainder of two numberc)Find’s out GCD of two numbersd)Find’s out Fibonacci series in range from A to BCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev