Print Pattern
Print the Following Pattern
For C++
#include<iostream.h>
void main()
{
int a,i;
clrscr();
for(i=65;i<=70;i++)
{
for(int j=65;j<i;j++)
{
cout<<j;
}
cout<<"\n";
}
getch();
}
For C
#include<stdio.h>
#include<conio.h>
void main()
{
int i ,j;
for(i=65;i<=70;i++)
{
for(j=65;j<i;j++)
{
printf("%d",j);
}
printf("\n";
}
getch();
}
0 comments:
Post a Comment