Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
Write a program that display
+23
votes
asked
Jan 22, 2022
by
Zohaib
(
420
points)
closed
Feb 6, 2022
by
Admin
Write a program that display
0000
111
22
3
closed with the note:
answered
help-please
c
2 Answers
+6
votes
answered
Jan 22, 2022
by
Zohaib
(
420
points)
Best answer
#include <stdio.h>
int main()
{ int i=0,j=3;
for(i=0;i<=3;i++)
{
for(j=3;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
}
commented
Jan 23, 2022
by
Peter Minarik
(
101,360
points)
I think the "Best answer" deserves to be correct: there's a
return 0;
missing from the end of the main().
:)
Please
log in
or register to add a comment.
+3
votes
answered
Feb 2, 2022
by
Yash Khadikar
(
200
points)
#include <stdio.h>
int main()
{
int num=0;
for(int i=4;i>0;i--)
{
for(int j=0;j<i;j++)
{
printf("%d",num);
}
printf("\n");
num++;
}
return 0;
}
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...