मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

Exchange the contents: Given two glasses marked A and B. Glass A is full of apple drink and glass B is full of grape drink. Write the specification for exchanging the contents - Computer Science

Advertisements
Advertisements

प्रश्न

Exchange the contents: Given two glasses marked A and B. Glass A is full of apple drink and glass B is full of grape drink. Write the specification for exchanging the contents of glasses A and B, and write a sequence of assignments to satisfy the specification.

टीपा लिहा

उत्तर

The sequence of assignments to satisfy the specification:
exchange(A, B)
–inputs : A, B are real and > 0
–outputs: A, B are real and > 0
State representation
T = A
A: = B
B: = T

shaalaa.com
Composition
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Composition and Decomposition - Evaluation - Section - D [पृष्ठ १०१]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 7 Composition and Decomposition
Evaluation - Section - D | Q 1. | पृष्ठ १०१
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×