|
Decimal to Binary |
|
|
|
Program Codes -
C Programmig
|
|
Written by Mansoorkhan
|
|
Friday, 06 November 2009 03:18 |
|
Write a program to convert decimal no to binary?
#include #include main() int i,j,n,a[10]; clrscr(); printf("ENTER THE NO.:"); |
|
Read more...
|
|
|
Programme to find HCF using Euclidean algorithm |
|
|
|
Program Codes -
C Programmig
|
|
Written by Mansoorkhan
|
|
Friday, 06 November 2009 03:15 |
A way of finding the highest common factor of two different numbers: 1) Divide the larger number by the smaller. 2) If the division can be done exactly then the HCF is the smaller number. If there is a remainder then the HCF is the same as the HCF of the remainder and the smaller number - so repeat step 1 with these two numbers. For instance, to find HCF(17, 20): 20/17 = 1, with remainder 3 so the HCF is the same as HCF(17, 3): 17/3 = 6 with remainder 1 so the HCF is the same as HCF(3, 1): 3/1 = 3; this is exact, so the HCF is 1.
Programme
#include #include |
|
Read more...
|
|
LCM of Two Nos |
|
|
|
Program Codes -
C++ Programming
|
|
Written by Mansoorkhan
|
|
Friday, 06 November 2009 03:13 |
|
#include #include main() { int a,b,t,i=1;; clrscr(); printf("Enter Two Nos : "); |
|
Read more...
|
|
Decimal to octal,binary and Hexadecimal conversion |
|
|
|
Program Codes -
C++ Programming
|
|
Written by Mansoorkhan
|
|
Friday, 06 November 2009 03:11 |
|
#include #include void convrt(int a,int b); void hexdec(int a); main() { int a,c,r; char cc; do { clrscr(); printf("\n\n\n\t\tMenu"); printf("\n\n\tConvert decimal to"); printf("\n\n\t1.Binary\n\n\t2.Octal\n\n\t3.Hexadecimal\n\n\t4.Exit\n\n Enter your choice : "); |
|
Read more...
|
|
Sub-String Search |
|
|
|
Program Codes -
C++ Programming
|
|
Written by Mansoorkhan
|
|
Friday, 06 November 2009 03:09 |
|
#include #include #include main() { clrscr(); int l,i,j=0,z=0,k=0; char a[200]="",b[20]; printf("\n\n enter the string:"); |
|
Read more...
|
|
|
|
|
|
|
|