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
Answer Posted / 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 |
Post New Answer View All Answers
Explain how do you list files in a directory?
What are near, far and huge pointers?
What is string concatenation in c?
Why calloc is better than malloc?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is a dynamic array in c?
Explain how do you print only part of a string?
How can type-insensitive macros be created?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
explain what are pointers?
Why does not c have an exponentiation operator?
Can we access array using pointer in c language?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Explain void pointer?