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
Biology,
8 months ago
English,
8 months ago
Biology,
8 months ago
Social Sciences,
1 year ago
English,
1 year ago