Triangle

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

triangle

# include<stdio.h>
# include<conio.h>
main()
{
clrscr();
int a,b,c;
printf("enter the number for a::::::");
scanf("%d", & a);
for(b=1;b<=7;b++)
{
for(c=1;c<=b;c++)
printf(%d", a);
printf("\n");
}
getch();
}
PROGRAM for TABLE Of STARTING and ENDING LIMIT

# include<stdio.h>
# include<conio.h>
main()
{
clrscr();
int t,r,i,sl,el;
printf("Enter the number for table which u want :::::::");
scanf("%d", & t);
printf("enter the starting limit ::::::::");
scanf("%d", & sl);
printf("enter the ending limit :::::::");
scanf("%d", & el");
for(i=sl ; i<=el ;i++)
{
r = i*t;
printf("%d * %d = %d" , t , i, r);
printf("\n");
}
getch();
}
even and odd
# include<stdio.h>
# include<conio.h>
main()
{
clrscr();
int i;
printf("enter any number:::::::::::");
scanf("%d", & i);
if(i%2 ==0)
printf("u have enter an even number");
else
printf("u hav enter an odd number");
getch();
}

You might also like