Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5
Answers were Sorted based on User's Feedback
Answer / deepti
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / devi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sreesen@ymail.com
#include<stdio.h>
void main()
{
int i,j,k=5;
for(i=1;i<=5;i++)
{
for(j=k;j<=0;j--)
{
printf("%d",i);
}
printf(""\n);
k--;
}
| Is This Answer Correct ? | 2 Yes | 2 No |
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
write a program of palindrome(madam=madam) using pointer?
What is pointer in c?
What is #include stdlib h?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
2 Answers HCL, IBM, Satyam, Vimal, Vimukti Technologies,
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
Do variables need to be initialized?
how to get starting address of a running C program
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);
Why c is called a mid level programming language?
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..???
write a program to generate 1st n fibonacci prime number