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 a nested loop?

653


What is a ternary operator in c?

659


Is there a built-in function in C that can be used for sorting data?

749


What is the ANSI C Standard?

782


What happens if a header file is included twice?

603






Is return a keyword in c?

603


Explain what is output redirection?

670


What is memory leak in c?

639


Why is c so important?

600


How are pointers declared in c?

603


Write a factorial program using C.

647


What is the difference between pure virtual function and virtual function?

656


List out few of the applications that make use of Multilinked Structures?

1310


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

640


What is bubble sort technique in c?

594