Q. Write a C program to print the following Reverse L-Shape pyramid as:
*************
*
*
*
*
*
*
*
Ans.
/*c program for reverse L-shape pyramid*/
#include<stdio.h>
int main()
{
int c;
for(c=1; c<=13; c++)
printf("*");
for(c=1; c<=7; c++)
printf("*\n");
getch();
return 0;
}
/**************************************************************
*************
*
*
*
*
*
*
*
Ans.
/*c program for reverse L-shape pyramid*/
#include<stdio.h>
int main()
{
int c;
for(c=1; c<=13; c++)
printf("*");
for(c=1; c<=7; c++)
printf("*\n");
getch();
return 0;
}
/**************************************************************
The output of above program would be:
**************************************************************/Figure : Screen shot for reverse L-Shape pyramid C program |
No comments:
Post a Comment