Pyramid Output: 1 212 32123 4321234 543212345 ........................ ........................ The Code Explained by below: //Ex. 4321234 - Here "432" - first part and "1"-Middle part then "234" - Second part. //StringBuilder is the bsest option for printing the sequnce numbers in same row /line. var sbObj = new StringBuilder(); int n = 5; // ToDO-Read the input from Console for (int i = 1; i <= n; i++) { if (i == 1) sbObj.AppendLine(i.ToString()); else { ...
- Get link
- X
- Other Apps