Find the sum of non-prime elements in the given array
Given an array arr[] and the task is to print the sum of the non-prime elements from the array. Examples: Input: arr[] = {1, 3, 7, 4, 9, 8} Output: 22 Non-prime elements are {1, 4, 9, 8} and 1 + 4 + 9 + 8 = 22 Input: arr[] = {11, 4, 10, 7} Output: 14 Approach: Initialize sum = 0 and start traversing