Sunday, 21 January 2018

Program for Multiplication table


Program for Multiplication table
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,j;
clrscr();
printf("enter the value:");
scanf("%d",&n);
printf("\t");
for(i=1;i<=n;i++)
printf("%5d",i);
printf("\n\n");
for(i=1;i<=20;i++)
{       printf("%d\t",i);
for(j=1;j<=n;j++)
{
printf("%5d",i*j);
}
printf("\n");
}
getch();
}�

Related Posts:

  • Putting Strings TogetherPutting Strings TogetherWe cannot assign one string to another directly We cannot join two strings together by the simple arithmetic addition.       string3 = string1+string2;       str… Read More
  • String Handling Functions In CString Handling Functions In CWith every C compiler a large set of useful string handling library functions are provided. The following figure illustrates the more commonly used functions along with theirpurpose.1.strlen: Fin… Read More
  • Introduction To StringsIntroduction To StringsThe way a group of integers can be stored in an integer array, similarly a group of characters can be stored in a character array . Character array are often called strings.A string constant is a one-di… Read More
  • Arithmetic Operations On CharactersArithmetic Operations On Characters'C' allows us to manipulate characters in the same way we do with numbers.Whenever a character constant or character variable is used in an expression , it is automatically converted to inte… Read More
  • Reading Strings From the TerminalReading Strings From the TerminalThe familiar input function scanf can be used with %s format specification to read in a string of characters.        char address[15];        scanf("%s"… Read More

0 comments:

Post a Comment