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

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

Given an array of elements, implement a logic to print the counts of even & odd integers separately. Concentrate on your array logic, variables, and printf() statements. Assume the array is already declared and defined, and is of size SIZE. int array[] = {some elements} Sample output: For example, if array[] = {23, 34, 45, 56, 67, 78}; The number of even integers in the array are: 3 The number of odd   integers in the array are: 3

Write a logic that prints the following pattern (a triangle)…

Write a logic that prints the following pattern (a triangle), based on the input value for N. Concentrate on your loop logic, variables, and printf() statements. Hint: Each line has some spaces, and some *s; and each element is of width 3. For example, for N = 3: Row 1: Element-1, and element-2 are spaces (each of width 3, i.e., 3 spaces). Element-3 is a * (of width 3, i.e., a space, a *, and a space). Row 2: Element-1 is space, Element-2 is *, Element-3 is space, Element-4 is *. Row 3: Element-1 is *, Element-2 is space, Element-3 is *, Element-4 is space, Element-5 is *. Once you come up with a formula, the implementation should be a cakewalk. If N = 3, it should print        *         *     *  *     *     * If N = 4, it should print           *            *     *     *     *     *  *     *     *     *