Awesome q2a theme
0 votes
5 views

List the invariant assertions at points $A, B, C,D,$ and $E$ in program given below:

Program division (input, output)
Const 
    dividend = 81; 
    divisor = 9;
Var  remainder, quotient:integer
begin 
    (*(dividend >= 0) AND (divisor > 0)*)  
    remainder := dividend;  
    quotient := 9;  
    (*A*)
While (remainder >= 0) do
begin (*B*)
    quotient := quotient + 1;
    remainder := remainder - divisor;
    (*C*)
end;  
    (*D*)
    quotient := quotient - 1;
    remainder := remainder + divisor;  
    (*E*)
end

https://gateoverflow.in/82425/gate1987-7a?show=316413#a316413

Can someone elaborate the answer given by Arjun sir in the above link?

in Programming by (7 points) | 5 views

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Apr 2020
  1. Ram Swaroop

    38 Points

  2. Kushagra गुप्ता

    36 Points

  3. !KARAN

    36 Points

  4. sushmitagoswami

    6 Points

  5. iot_ts

    6 Points

  6. TrenaGreeves

    5 Points

  7. Theda53E2483

    5 Points

  8. FrancescoG89

    5 Points

  9. PalmaMast586

    5 Points

  10. MarciaNaranj

    5 Points

3,527 questions
1,658 answers
10,469 comments
90,059 users