Tag Archives: two

ASSEMBLY04 An Assembly program to exchange two memory variables using XCHG instruction

Now we will write another Assembly program which does some Exchange Operation. Before actually starting to write the program, Let’s understand XCHG instruction. As we know the programs work only with the instructions in the instruction set. Instruction XCHG is used to EXCHANGE memory variables in the following permutations above. REG stands for Registers (Eg.  AX, BX, CX,… Read More »

ASSEMBLY01 An Assembly program to add two numbers present in (variables) memory locations and store the result in next (variable) memory location

Now we will write another Assembly program which does some Addition Operations. Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1 and NUM2. Other variables will be holding the Output or Result of the… Read More »

C027 A C program that multiply two complex numbers

Let’s identify variables needed for the structure inside the program. In this complex structure, we need two variables to store real part and imaginary part of complex number. First variable will be the one which will save the real part of complex number and it will be REAL. Second variable will be the one which… Read More »

C015 An interactive C program to do the following computation by providing the option using the switch statement 1.Add two matrices. 2. Subtract two matrices. 3. Multiply two matrices.

Let’s identify variables needed for this program. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional ARRAY. Multi-dimensional Array is a nothing different than any Array but the only difference is that it has more than one dimension to it e.g. square has two… Read More »

A C program to Add two matrices (matrix) or Subtract two matrices (matrix)

Let’s identify variables needed for this program. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional ARRAY. Multi dimensional Array is a nothing different than any Array but the only difference is that it has more than one deminsion to it e.g. square has… Read More »

C008 An interactive C program to check whether given two numbers are amicable numbers or not

Amicable numbers are two numbers so related that the sum of the proper divisors of the one is equal to the other, unity being considered as a proper divisor but not the number itself. Let’s identify variables needed for this program. First two variables will be the one which will save the values entered by… Read More »