write a program in c to print ****
* *
* *
****
Answer / 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 |
explain what is an endless loop?
pierrot's divisor program using c or c++ code
Write code for finding depth of tree
What is external variable in c?
Can math operations be performed on a void pointer?
write a program to display the numbers having digit 9 in the given range from 1 to 100
Which header file is essential for using strcmp function?
Can static variables be declared in a header file?
how to find the kth smallest element in the given list of array elemnts.
Is c call by value?
1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }