program should print
1
2 1
3 3 1
4 6 4 1
and then should ask for input from user and then it should print the sum of the elements in that row
if we enter 1
then it should return 1
if we enter 2
then it should return 2+1 i.e. 3
for 3
3+3+1 i.e. 9..
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted Dec 16, 2016, 11:17 AM EST