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 |
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,
what is the flow of execution in cprogram? ex:printf();,scanf();
c program to add and delete an element from circular queue using array
Tell me when would you use a pointer to a function?
#define f(x) main() { printf("\n%d",f(2+2)); }
Difference between pass by reference and pass by value?
why we use pointer in c
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }
Lists the benefits of c programming language?
What are near, far and huge pointers?
0 Answers Hexaware, Thomson Reuters, Virtusa,
Is it valid to address one element beyond the end of an array?
how can i print "hello"