how can i get this by using for loop?
*
**
*
****
*
******
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
clrscr();
printf("enter the lines :");
scanf("%d",&m);
for(int i=1;i<=m;i+=2)
{
for(int j=-2;j<=i;j+=2)
printf("*");
printf("*\n*");
}
getch();
}
thank u
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How macro execution is faster than function ?
how is the examination pattern?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What is the role of this pointer?
Explain the array representation of a binary tree in C.
What is memory leak in c?
What are the primitive data types in c?
Explain the difference between exit() and _exit() function?
What is difference between structure and union in c?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
How important is structure in life?
Explain pointer. What are function pointers in C?
What is the hardest programming language?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What is c system32 taskhostw exe?