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

Is c call by value?

613


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

3299


Explain what is the benefit of using #define to declare a constant?

614


Explain enumerated types in c language?

608


show how link list can be used to repersent the following polynomial i) 5x+2

1683






How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

598


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

670


What is a built-in function in C?

801


any "C" function by default returns an a) int value b) float value c) char value d) a & b

673


What is the use of bitwise operator?

694


What are qualifiers in c?

576


what is the structure pointer?

1648


How can I delete a file?

633


What are unions in c?

586


How do I use strcmp?

645