Write a program in c to print
*
* *
* *
*******
Answer / kapil
#include<stdio.h>
void main()
{
int i=0,j=1;
while(i<3)
{
while(j<=7)
{
if(j-i==4||j+i==4)
printf("*");
else
printf(" ");
j++;
}
printf("\n");
i++;
j=1;
}
while(j<=7)
{
printf("*");
j++;
}
}
Is This Answer Correct ? | 5 Yes | 2 No |
How can I increase the allowable number of simultaneously open files?
Why does not c have an exponentiation operator?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Difference between C and Embedded C?
How to get string length of given string in c?
what is linkage error when it occurs in c program
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What are keywords in c with examples?
What is a pointer variable in c language?
a 'c' program to tell that the set of three coordinates lie on a same line
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?
What is variable initialization and why is it important?