Warning: include(topsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 13

Warning: include(topsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 13

Warning: include(): Failed opening 'topsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 13

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

Computer Science / IT
Electronics
Electrical
Mechanical
Chemical
Civil

CAT / MBA

GMAT / Foreign MBA
Latest Jobs

Displaying  Source Code(s)

Warning: include(adsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 31

Warning: include(adsc.html): failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 31

Warning: include(): Failed opening 'adsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/combination_of_number.html on line 31

 Combination of Numbers -------------------------------------------------------------------------------- Description : This program will print all the combination of numbers as you enter. Just try it and let me know if there is any updation Code : /* Combination of Numbers */ #include #include int a[20],b[20]; long int count=0; long int cal=0; long int ite=1; long int tot[30]; main() { int i,val,k,n,tmp,j,sum=0; clrscr(); printf("Enter the Number: "); scanf("%d",&n); ite=1; for(i=1;i,a[1],a[2]); printf("%d %d ",a[2],a[1]); } else for(val=1;val<=n;val++) { for(j=1;j<=n;j++) { b[j] = a[j]; } for(i=1;i<=cal;i++) { if((n-3) == 1) { prin(n,b[n-2],b[n-1],b[n]); tmp=b[1]; for(k=1;k1;j--) { prin(n,b[n-2],b[n-1],b[n]); tmp = b[n-3]; for(k=n-3;k,cal); getch(); } prin(int n,int a1,int a2,int a3) { int s,i,j,t; int c[20],d[20]; for(s=1;s<=n-3;s++) c[s]=a[s]; d[1]=a1; d[2]=a2; d[3]=a3; for(i=1;i<=3;i++) { for(j=1;j<=n-3;j++) printf("%d ",c[j]); printf("%d %d %d ",d[1],d[2],d[3]); printf("
); for(j=1;j<=n-3;j++) printf("%d ",c[j]); printf("%d %d %d ",d[1],d[3],d[2]); printf("
); t=d[1];d[1]=d[2];d[2]=d[3];d[3]=t; for(j=1;j<=n;j++) { if(c[1] == j) tot[j]++; } } printf("
); }

Contribute content or training reports / feedback / Comments
job placement papers