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 |
can we print any string in c language without using semicolon(;)(terminator) in whole program.
Why do we use stdio h and conio h?
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
Write a program that accept anumber in words
Why is sizeof () an operator and not a function?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a<b,printb.find the sum digits of that number & then print.if a==b multiply 10 with a & add 20 with b store in c and then print
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What are the two forms of #include directive?
what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>>
How can type-insensitive macros be created?
What is null pointer constant?
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }