[Solved] C++ dice rolling and graph [closed]

so i ended up figuring it out. i ended up placing the graph in a different part of the code and got it working. for (int face = 2; face < arraysize; face++) { sum = ((sum + counter[face]) / 36000000) * 100; cout << setw(7) << face << setw(13) << counter[face] << setw(15) << … Read more

[Solved] Why my output isn’t correct?

I commented the changed portion and explained why. I didn’t change your code, so that you can understand easily. Try this : #include <stdio.h> #include <stdlib.h> #include <string.h> struct AdjListNode { char *dest; struct AdjListNode* next; }; struct AdjList { struct AdjListNode *head; // pointer to head node of list }; struct Graph { int … Read more

[Solved] Find the Shortest Cycle in Graph

If You’re looking for a complete answer, then just check other answers – there are tons of questions regarding used algorithms and I’ve also found an answer with code ported to many different programming languages (Cpp version is also there) Algorithm explanation C++ version I’d strongly recommend though, that You take a look at algorithms … Read more