Write a C program to get the desired output.


1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
.
.
.
1 n..............n 1
Note: n is a positive integer entered by the user.

Answer Posted / ch.mahathi

could anyone please assist me in getting the output in the following way?

For example, if you have entered a pin number like 532211 as the input to the program , then the output should be like this



(5)+(5+3)+(5+3+2)+(5+3+2+1)+(5+3+2+2+1)+(5+3+2+2+1+1)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c language used for?

733


What are the disadvantages of external storage class?

825


What is the use of extern in c?

853


Is c call by value?

818


What is gets() function?

876


Why is main function so important?

853


What is an array in c?

798


Explain the properties of union.

835


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

1850


Explain the red-black trees?

831


Why isnt any of this standardized in c?

854


What are the applications of c language?

852


Explain how can I convert a number to a string?

874


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

819


What is unary operator?

865