Some more Codes and Answers

1. Proram to Convert Decimal To Binary and Print It(C-Lang)
void main(){int a=0,b=0,n,i=1,j,k=0;int ar[10]={0,0,0,0,0,0,0,0,0,0};clrscr();printf(“\n Enter the decimal number”);scanf(“%d”,&n);while(n!=0){a=n%2;b=n/2;ar[i++]=a;n=b;k++;}for(j=k+1;j>=1;j–)printf(“%d”,ar[j]);getch();}————————————————————————————————2. A function to sort three number entered by the user( C++)void sort(int a, int b , int c){int t;if (a>b){t=b;b=a;a=t;}if (a>c){t=c;c=a;a=t;}if (b>c){t=b;b=c;c=t;}cout^^a^^b^^c;}
Note : Extraction Operators are not working due to HTML tags, so I use ^^ instead of [...]

Codes By Shariq Khan

Codes By Shariq Khan
This is a one stop place for new Computer Programmers and Students who want to learn C, C++, Java, C#, VB, C++,ASP.Net and many more. I will regularly post new programmes and code to help them to find the solution of the problems. Also I request all the visitors of this blog [...]