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 |
What is pointers in c with example?
Q.11 Generate the following pattern using code in any language(c/c++/java) for n no. of rows 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
wats the diference btwen constant pointer and pointer to a constant.pls give examples.
What does %c do in c?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
What is memory leak in c?
can we declare a function inside the structure? ex: struct book { int pages; float price; int library(int,float); }b; is the above declaration correct? as it has function declaration?
what is Structural oriented language? give some example of this language.....?
how to add our own function in c library please give details.?
What is the use of #include in c?
Where we use clrscr in c?