Menus

Showing posts with label C programs. Show all posts
Showing posts with label C programs. Show all posts

Thursday 6 February 2020

Printing Pattern in C



#include<stdio.h>

void main()
{

int l,i,j;

printf("Enter number of lines");
scanf("%d",&l);

for(i=1;i<=l;i++)
{
   for(j=1;j<=i;j++)
   { 
printf(" *");
   }  

   printf("\n");

}

}








Thursday 30 January 2020

Write c program to print multiplication table of a number


#include<stdio.h>

void main()
{

int n,i;

printf("Enter number ");
scanf("%d",&n);


for(i=1;i<=10;i++)
{

printf("%d * %d = %d\n",i,n,i*n);

}


}