Runtime Error..

Please Help me…
Getting Runtime Error(SIGSEGV).

Please Check my code and tell me the fault…
Code link given below with question.

Question Link:-

Code Link:-

  1. Define size of int m[P] inside loop after taking input for P.
  2. Remove all unnecessary cout.
  3. correct output format as add “<<endl”
    see this corrected code.
1 Like