Finding number of nodes in a cycle

How would I create an algorithm to find the number in a graph that are in a cycle?

1 Like

Thank you!