Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to do count and modulo operations in array?

+3 votes
asked Jun 5, 2019 by Padmaselvaraj (190 points)

1 Answer

0 votes
answered Mar 12 by Sidra Shahid (140 points)

counting usually involves iterating through the Array and incrementing a ""counter" variablr whenever a condition is met.Basic count if you want to know how many times a specific values appears:

  • Initialize a counter at 0.
  • Loop through every element.
  • If the element matches your target,add 1 to the counter.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...