To Write a C Program to Print the Given Pattern
Write a C program to print the following pattern? * * * * * * * * * * * *
Answers
Answered by
1
#include<stdio.h>
void main()
{
int a,b;
for(a=5;a>2;a--)
{
for(b=1;b<=a;b++)
{
printf("*",a);
}
}
getch();
}
output of the program is
************
void main()
{
int a,b;
for(a=5;a>2;a--)
{
for(b=1;b<=a;b++)
{
printf("*",a);
}
}
getch();
}
output of the program is
************
Similar questions