Quick Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem Solved Problem#CPP#6987

Problem Statement - 03A-2019S-C1

Write a user-defined function NoTwoThree(int Arr[], int N) in C++, which should display the value of all such elements and their corresponding locations in the array Arr (i.e. the array index), which are not multiples of 2 or 3. N represents the total number of elements in the array Arr, to be checked.

Example: If the array Arr contains

0          1           2         3          4

25 8 12 49 9

Then the function should display the output as:

25 at location 0

49 at location 3

Solution