Tag Archives: numbers

Draw a flow chart and write a program in C to sort a given list of numbers. 7m Jun2007

Draw a flow chart and write a program in C to sort a given list of numbers. 7m Jun2007   Flowchart: Code: #include<stdio.h> void main() { int I,J,Temp,List[]={6,3,0,4,8,2,5,9,1,7}; clrscr(); printf(“List Before Sorting :\n”); for(J=0;J<10;J++) { printf(“%d “,List[J]); } for(I=0;I<10;I++) { for(J=0;J<=I;J++) { if(List[J]>List[I]) { Temp=List[I]; List[I]=List[J]; List[J]=Temp; } } } printf(“\nList Before Sorting :\n”); for(J=0;J<10;J++)… Read More »

Write a program in ‘C’ to print automorphic numbers. The automorphic number is a number in which the square of the number contains the number in the end. 10m Dec2005

Write a program in ‘C’ to print automorphic numbers. The automorphic number is a number in which the square of the number contains the number in the end. Example: (a) 5; 25 (b) 6; 36. 10m Dec2005 #include<stdio.h> void main() {   int SQ,i,NUM;   clrscr();   printf(“AUTOMORPHIC NUMBERS BETWEEN 0 TO 999 ARE :… Read More »

Design an algorithm and draw corresponding flowchart to find all the prime numbers between two given numbers ‘m’ and ‘n’, where m, n > 0. 10m Dec2005

Design an algorithm and draw corresponding flowchart to find all the prime numbers between two given numbers ‘m’ and ‘n’, where m, n > 0. 10m Dec2005 An algorithm is a finite set of steps defining the solution of a particular problem. An algorithm is expressed in pseudo code – something resembling C language or… Read More »

ASSEMBLY10 An Assembly program to calculate the average of three given numbers stored in memory

Now we will write another Assembly program to calculate the average of three given numbers stored in memory. 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, NUM2 and NUM3. Other variables will be holding… Read More »

ASSEMBLY06 An Assembly program to read two decimal numbers, then multiply them together and finally print out the result (in decimal )

Now we will write another Assembly program to read  two decimal numbers, then multiply them together and finally print out the result (in decimal ) 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 Multiplied and it will be NUM1 and… Read More »

ASSEMBLY05 An Assembly program to find the sum of two BCD numbers stored in memory

Now we will write another Assembly program to find the sum of two BCD numbers stored in memory. 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… 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 »

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 »