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

How can I insert or delete a line (or record) in the middle of a file?

562


Explain what is the difference between #include and #include 'file' ?

571


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

619


What are the advantages of Macro over function?

1178


I have seen function declarations that look like this

587






hi send me sample aptitude papers of cts?

1642


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

740


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

694


What is operator precedence?

634


Why do we need volatile in c?

733


Create a simple code fragment that will swap the values of two variables num1 and num2.

797


Can a variable be both const and volatile?

661


How can I find out if there are characters available for reading?

630


What is the meaning of && in c?

539


What are loops c?

604