Tag Archives: integer

Write a program to do linear search for an integer in 20 distinct numbers. The program should return the location of an element – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-045 Course Title : Introduction to Algorithm Design Lab Assignment Number : BCA(IV)/L-045/Assignment/2015 Maximum Marks : 50 Weightage : 25% Write a program to do linear search for an integer number in an array of 20 distinct numbers. The program should return the location of an element if… Read More »

A C program to print Values in forward and reversed order – IGNOU MCA Assignment 2014 – 15

 MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2014-15 Maximum Marks : 100 Weightage : 25%   Write an algorithm, draw a corresponding flowchart and write an interactive C program to prompt the user to input 3 integer values and print these values in forward and… Read More »

An Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key

Now we will write another Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key.   The above Logic is a C like Program to conduct a binary search we need small Algorithm Shown above in a very simple way, So Just we will covert… Read More »

ASSEMBLY19 An Assembly program to find the LCM Least Common Multiplier of two 16-bit unsigned integers

Now we will write another Assembly program to find the LCM Least Common Multiplier of two 16-bit unsigned integers. The above Logic is a C like Program to Find LCM we need its GCD or HCF first beacuse there is small Formula Shown above in a very simple way, So Just we will covert the logic into Assembly There… Read More »

ASSEMBLY20 An Assembly program to find the HCF Highest Common Factor (GCD Greatest Common Divisor) of two 16-bit unsigned integers

Now we will write another Assembly program to find the HCF Highest Common Factor (GCD Greatest Common Divisor) of two 16-bit unsigned integers. The above Logic is a C like Program to Find GCD or HCF in a very simple way, So Just we will covert the logic into Assembly There are many things uncommon in the… Read More »

ASSEMBLY12 An Assembly program to Evaluate 3*(x^3)+4x+5 if flag is 1 or Evaluate 7x+8 if flag is 0. Assume X is 16-bit unsigned integer

Now we will write another Assembly program to Evaluate 3*(x^3)+4x+5 if flag is 1 or Evaluate 7x+8 if flag is 0. Assume X is 16-bit unsigned integer Let’s identify variables needed for this program. First variable will be the one which will hold the value predefined by programmer of 16 bit in the variable X, second variable will be… Read More »

C029 A C program with a function that returns the minimum and the maximum value in an array of integers

void minmax(int array[],int length,int *min,int *max); //prototype Let’s identify variables needed for this program. In this program, we need several variables to store array of decimal numbers and count the length of array and store minimum and maximum of the array. First variable will be the one which will save the list of integers in… Read More »

C005 An interactive C program to generate the divisors of a given integer

Divisors are the numbers which can divide the number given and are less than the given number. Let’s identify variables needed for this program. First variable will be the one which will save the value entered by the user and it will be NUM. Other variable will be i which will be for FOR Loop.… Read More »