Oct 26 2009

Multiple Table

Category: C Programmingadmin @ 11:56 pm

This program show a multiple table

/*Exercise 4.1*/
#include<stdio.h>
int main (void)
{
  int input,i,j,ans;
  printf("Enter the number: ");
  scanf("%d",&input);
 
  for(i=1;i<=input;i++)
  {
    printf("\t(%d)\t",i);
  }
  printf("\n----------------------------------------------------------------------------------------------------");
 
 
  for(i=1;i<input+1;i++)
  {
    ans=1;
    printf("\n(%d)",i);
    for(j=1;j<=input;j++)
    {
      ans=i*j;
      printf("\t %d\t",ans);
    }
    printf("\n--------------------------------------------------------------------------------------------------");
 
  }
  printf("\n");
  return 0;
}

Download Source code & exe

Tags: , , , ,

2 Responses to “Multiple Table”

  1. Rick says:

    Dude are you crazy or what? I thought this was your personal blog and you’re teaching others C+
    lol pathetic

  2. admin says:

    I have the same problem are you crazy? that is not C++ its C :P

Leave a Reply