View previous topic :: View next topic
|
Author |
Message |
suji
New User
Joined: 28 Feb 2006 Posts: 3 Location: Hyderabad
|
|
|
|
Hi,
There are two variable say A and B with values 5 and 6 respectively. I want to swap these two values without using temporary variable in cobol.
Please post the reply |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
Hi,
U can do like
A=A*B
B=A/B
A=A/B
AND ONE MORE WAY IS
A=A+B
B=A-B
A=A-B |
|
Back to top |
|
|
suji
New User
Joined: 28 Feb 2006 Posts: 3 Location: Hyderabad
|
|
|
|
Thanks a lot Nuthan |
|
Back to top |
|
|
|