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
Why is c called c?
What is pragma in c?
What is a method in c?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
In c language can we compile a program without main() function?
What happens if you free a pointer twice?
How can I implement sets or arrays of bits?
Does c have enums?
Can you subtract pointers from each other? Why would you?
How we can insert comments in a c program?
Explain what is meant by high-order and low-order bytes?
What is gets() function?
Which is better pointer or array?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What is meant by initialization and how we initialize a variable?