Search This Blog

Friday, October 7, 2011

Display Mathematical tabel using for loop

   1:  #include<stdio.h>
   2:  #include<conio.h>
   3:  void main()
   4:  {
   5:  int i,n;
   6:  clrscr();
   7:  printf("Enter the number: \n");
   8:  scanf("%d",&n);
   9:  for(i=1;i<=10;i++)
  10:  {
  11:  printf("%3d x %3d = %3d\n",n,i,n*i);
  12:  }
  13:  getch();
  14:  }

No comments:

Post a Comment