C Program

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View C Program as PDF for free.

More details

  • Words: 201
  • Pages: 3
/*This program will print all the combination of numbers as you enter. /* Combination of Numbers */ #include <stdio.h> #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
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
");

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("

Related Documents