write a program in c to print ****
* *
* *
****
Answer Posted / rajkumar
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=0;i<=3;i++)
{
printf("*");
}
for(i=4;i<5;i++)
{
printf(" ");
}
for(i=5;i<6;i++)
{
printf("*");
}
for(i=6;i<7;i++)
{
printf(" ");
}
for(i=7;i<8;i++)
{
printf("*");
}
for(i=8;i<9;i++)
{
printf(" ");
}
for(i=9;i<10;i++)
{
printf("*");
}
for(i=10;i<11;i++)
{
printf(" ");
}
for(i=11;i<12;i++)
{
printf("*");
}
for(i=12;i<13;i++)
{
printf(" ");
}
for(i=12;i<=15;i++)
{
printf("*");
}
getch();
}
Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
program to convert a integer to string in c language'
What is else if ladder?
Why cant I open a file by its explicit path?
What is a spanning Tree?
Is c call by value?
What are external variables in c?
Can main () be called recursively?
How can you invoke another program from within a C program?
Where does the name "C" come from, anyway?
what is the basis for selection of arrays or pointers as data structure in a program
Give basis knowledge of web designing ...
What is c language and why we use it?
List the difference between a While & Do While loops?
How many main () function we can have in a project?