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
How can you access memory located at a certain address?
Can we use visual studio for c?
Why do we need volatile in c?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What are global variables and how do you declare them?
What is the difference between malloc() and calloc() function in c language?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
Explain goto?
Why c is a mother language?
Can the curly brackets { } be used to enclose a single line of code?
How can I read a binary data file properly?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Explain how do you determine a file’s attributes?
What are unions in c?
Is it possible to pass an entire structure to functions?