C programming

Saturday, January 17, 2009

#include #include int c=0;int n,i,j; void mul(int a,int c) { for(i=1;i<=10;i++) { for(j=c+1;j<=a;j++) { printf(" "); printf("%2d X %2d = %2d ",j,i,j*i); } printf("\n\n"); } } void main() { clrscr(); printf("Enter the number:"); scanf("%d",&n); int k=0;int m=5; while(k!=n) { if(n<=5) { mul(n,c); k=n; } else { k=k+m; mul(k,c); c=k; printf("\n"); m=n-k; if(m>=5) m=5; } } getch(); }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP