You are on page 1of 7

Programe:-1

Write a programe for following output.


*
**
***
****
*****
Input:-
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}

Programe:-2
Write a programe for following output.
1
12
123
1234
12345
Input:-
#include<stdio.h>

For More & Download Visit http://www.nectarkunj.byethost14.com/


#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%d ",j+1);
}
printf("\n");
}
getch();
}

Programe:-3
Write a programe for following output.
1
22
333
4444
55555
Input:-
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();

for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%d ",i+1);
}
printf("\n");

For More & Download Visit http://www.nectarkunj.byethost14.com/


}
getch();
}

Programe:-4
Write a programe for following output.
1
21
321
4321
54321
Input:-
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();
for(i=0;i<n;i++)
{
for(j=i;j>=0;j--)
{
printf("%d ",j+1);
}
printf("\n");
}
getch();
}

Programe:-5
Write a programe for following output.
5
54
543
5432

For More & Download Visit http://www.nectarkunj.byethost14.com/


54321
Input:-
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();

for(i=0;i<n;i++)
{
for(j=n;j>=n-i;j--)
{
printf("%d ",j);
}
printf("\n");
}
getch();
}

Programe:-6
Write a programe for following output.
5
44
333
2222
11111
Input:-
#include<stdio.h>
#include<conio.h>

void main()
{

int i,j,n=5;
clrscr();

For More & Download Visit http://www.nectarkunj.byethost14.com/


for(i=n;i>0;i--)
{
for(j=0;j<=5-i;j++)
{
printf("%d ",i);
}
printf("\n");
}
getch();
}

Programe:-7
Write a programe for following output.
1
14
149
1 4 9 16
1 4 9 16 25
Input:-
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n=5;
clrscr();
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%d ",(j+1)*(j+1));
}
printf("\n");
}
getch();
}

Programe:-8
Write a programe for following output.

For More & Download Visit http://www.nectarkunj.byethost14.com/


E
DD
CCC
BBBB
AAAAA
Input:-
#include<stdio.h>
#include<conio.h>

void main()
{

int i,j,n=5,k=69;
clrscr();

for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%c ",k);
}
k--;
printf("\n");
}
getch();
}

Programe:-9
Write a programe for following output.
A
AB
ABC
ABCD
ABCDE
Input:-

For More & Download Visit http://www.nectarkunj.byethost14.com/


#include<stdio.h>
#include<conio.h>

void main()
{

int i,j,n=5,k;
clrscr();

for(i=0;i<n;i++)
{
k=65;
for(j=0;j<=i;j++)
{
printf("%c ",k);
k++;
}

printf("\n");
}
getch();
}

For More & Download Visit http://www.nectarkunj.byethost14.com/