program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / jayaraj.s
#include <stdio.h>
main()
{
int a,b,i=1;
for(a=i;a<=5;a++)
{
for(b=a;b<=5;b++)
{
printf("%d",b);
}
printf("\n");
i++;
}
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain what standard functions are available to manipulate strings?
How do you define structure?
What are the 4 types of functions?
Explain what is dynamic data structure?
What is FIFO?
Write programs for String Reversal & Palindrome check
Does c have circular shift operators?
Explain what does it mean when a pointer is used in an if statement?
What are linked lists in c?
How to delete a node from linked list w/o using collectons?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
why do some people write if(0 == x) instead of if(x == 0)?
Why do we need functions in c?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above