Write a program for the following series?
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
1234567890987654321
123456789010987654321
12345678901210987654321
1234567890123210987654321
.........1234321............
..........123454321............
..........12345654321............
7
8
9
0
1
Pls............?
Answer Posted / ubaid
Copy and paste it will run successfully..
#include<conio.h>
#include<stdio.h>
void Ubaid(int x)
{
for(int i=x;i>0;i--)
{
printf("\n");
for(int j=1; j<=i; j++)
{
printf("%d",j);
}
for(int u=i-1;u>0;u--)
{
printf("%d",u);
}
}
//start another from here
for(int p=1;p<=x;p++)
{
printf("\n");
for(int e=1;e<p;e++)
{
printf("%d",e);
}
for(int o=e;o>0;o--)
{
printf("%d",o);
}
}
}
void main()
{
clrscr();
printf("the output of function is..");
printf("\n");
printf("\n");
Ubaid(6);
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why clrscr is used after variable declaration?
The statement, int(*x[]) () what does in indicate?
Write a factorial program using C.
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Differentiate between declaring a variable and defining a variable?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What are disadvantages of C language.
Can you write the function prototype, definition and mention the other requirements.
What is local and global variable in c?
code for replace tabs with equivalent number of blanks
Tell me is null always defined as 0(zero)?
Explain what is the difference between functions getch() and getche()?
Explain what is the general form of a c program?
What is pointer to pointer in c language?
What is the difference between int main and void main?