Write a logic that prints the following pattern, based on th…

Write a logic that prints the following pattern, based on the input value for N. Concentrate on your loop logic, variables, and printf() statements. Once you come up with a formula, the implementation should be a cakewalk. For example, for N = 4: Row 1 (or any odd-numbered row): Print 4 integers starting with 10*(row_no)+1, and incrementing. Row 2 (or any even-numbered row): Print 4 integers starting with 10*(row_no+1)-1, and decrementing. If N=3, it should print11 12 1329 28 2731 32 33 If N = 4, it should print11 12 13 1429 28 27 2631 32 33 3449 48 47 46

Given an array of elements, implement a logic to print the s…

Given an array of elements, implement a logic to print the second largest number without sorting. Concentrate on your array logic, variables, and printf() statements. Assume the array is already declared and defined, and is of size SIZE. int array = {23, 34, 45, 56, 67, 78}; The second largest element in the array is: 67

Write a logic that prints the following pattern, based on th…

Write a logic that prints the following pattern, based on the input value for N. Concentrate on your loop logic, variables, and printf() statements. Once you come up with a formula, the implementation should be a cakewalk. For example, for N = 4: Row 1 (or any odd-numbered row): Print 4 integers starting with 1, and incrementing. Row 2 (or any even-numbered row): Print 4 integers starting with 9, and decrementing If N = 3, it should print1 2 39 8 71 2 3 If N = 4, it should print1 2 3 49 8 7 61 2 3 49 8 7 6