English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Circulate the contents: Write the specification and construct an algorithm to circulate the contents of the variables A, B, and C as shown below: The arrows indicate that B gets the value - Computer Science

Advertisements
Advertisements

Question

Circulate the contents: Write the specification and construct an algorithm to circulate the contents of the variables A, B, and C as shown below: The arrows indicate that B gets the value of A, C gets the value of B and A gets the value of C.

Short Note

Solution

Specification :
Circulated,B,C)
– – inputs: A,B,C all are real numbers
– – outputs: A,B,C, all are real numbers
T: = C
C: = B
B: = A
A: = T

Algorithm :
i) circulated,B,C)
ii) – – A,B,C
iii) T = C
iv) C = B
v) B = A
vi) A: = T

shaalaa.com
Notations for Algorithms
  Is there an error in this question or solution?
Chapter 7: Composition and Decomposition - Evaluation - Section - D [Page 101]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 7 Composition and Decomposition
Evaluation - Section - D | Q 2. | Page 101
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×