how can i get this by using for loop?
*
**
*
****
*
******

Answer Posted / suman_kotte

int i,j;
for(i=1;i<=3;i++)
{
print("*");
print("\n");
for(j=1;j<=i*2;j++)
print("*");
print("\n");
}

Is This Answer Correct ?    14 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a program flowchart and how does it help in writing a program?

655


Explain zero based addressing.

604


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

916


What is a MAC Address?

624


Do you know the difference between exit() and _exit() function in c?

605






What are the three constants used in c?

542


write a program to find out prime number using sieve case?

1634


What is a program flowchart?

598


What are header files? What are their uses?

633


Why does everyone say not to use gets?

603


Write a c program to demonstrate character and string constants?

1678


How can you return multiple values from a function?

626


Apart from dennis ritchie who the other person who contributed in design of c language.

801


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3180


How does struct work in c?

604