how can i get this by using for loop?
*
**
*
****
*
******
Answer Posted / vignesh1988i
sorry folks, a small mistake in above program , the below is the correct one's...........
#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)
{
printf("*");
for(int j=-2;j<=i;j+=2)
printf("*");
printf("*\n");
}
getch();
}
thank u
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
in iso what are the common technological language?
Is r written in c?
Explain how can you determine the size of an allocated portion of memory?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is difference between class and structure?
Explain the process of converting a Tree into a Binary Tree.
I came across some code that puts a (void) cast before each call to printf. Why?
What are called c variables?
What are preprocessor directives in c?
Is a house a mass structure?
What is the explanation for prototype function in c?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Why clrscr is used after variable declaration?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.