Output for following program using for loop only
*
* *
* * *
* * * *
* * * * *
Answers were Sorted based on User's Feedback
Answer / sjyamsunderreddy.beemudi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf(\n);
}
getch();
}
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / dhruv sharma rkdf
#include<stdio.h>
#include<conio.h>
void main(){
int i,j;
clrscr();
for(i=1;i<=5;i++){
for(j=i;j>0;j--){
printf("*");
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sampath
for(i=0;i<=5;i++){
for(j=i;j<=i;j++)
printf("*");
printf("\n");
}
Is This Answer Correct ? | 0 Yes | 2 No |
What is the difference between variable declaration and variable definition in c?
1. Write a program to reverse every second word in a given sentence.
What is variable declaration and definition in c?
What is the difference between exit() and _exit() function in c?
Explain the process of converting a Tree into a Binary Tree.
How can I swap two values without using a temporary?
difference between c and c++
Why doesnt that code work?
what is the function of pragma directive in c?
Is double link list a linear data structure? If Yes, Why?If No, Why?
Is the following code legal? struct a { int x; struct a b; }
What is %g in c?