Write a program in c to print
1
121
12321
1234321
123454321
Answers were Sorted based on User's Feedback
Answer / vivek raghuwanshi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,num;
cout<<num;
for(i=1;i<=num;i++)
{
for(j=1;j<i-1;j++)
{
cout<<" ";
}
for(k=1;k<i;k++)
{
cout<<k;
}
for(k=i;k>=1;k--)
{
cout<<k;
}
}
}
| Is This Answer Correct ? | 13 Yes | 31 No |
How is a macro different from a function?
what does keyword ‘extern’ mean in a function declaration?
whitch value return void main?
if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE
how to find anagram without using string functions using only loops in c programming
what r callback function?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Where can I get an ansi-compatible lint?
why we need function pointers?
Is it cc or c in a letter?
if p is a string contained in a string?
how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"