AIM: TO SWAP 2 NUMBERS WITHOUT USE OF TEMPORARY VARIABLE THEORY: C is a general-purpose, middle level, procedural computer programming language supporting structured programming, lexical variable...


AIM: TO SWAP 2 NUMBERS WITHOUT USE OF TEMPORARY<br>VARIABLE<br>THEORY: C is a general-purpose, middle level, procedural computer<br>programming language supporting structured programming, lexical variable scope,<br>and recursion, with a static type system. C is an imperative procedural language.<br>Let a and b be variables in which integral values are being inserted . tw numbers<br>can be swapped without using a temporary variable by using arithmetic operations.<br>Another alternative method is by use of logical operators.<br>ALGORITHM:<br>STEP 1: Start<br>STEP 2:Print

Extracted text: AIM: TO SWAP 2 NUMBERS WITHOUT USE OF TEMPORARY VARIABLE THEORY: C is a general-purpose, middle level, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system. C is an imperative procedural language. Let a and b be variables in which integral values are being inserted . tw numbers can be swapped without using a temporary variable by using arithmetic operations. Another alternative method is by use of logical operators. ALGORITHM: STEP 1: Start STEP 2:Print "Enter two numbers'" STEP 3: Input x,y STEP 4:Print “ Numbers x,y before swapping STEP 5: x x+y STEP 6: y<– x-y="" step="" 7:="" x="" x-y="" step="" 8:="" print="" “="" numbers="" x,y="" after="" swapping="" "="" step="" 9:="">

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here