Tower of hanoi geeting error

getting segmentation fault

@aattuull tum a se c bhej rahe ho using b but question hai a to b using c

for that I have to replace C and B in line 19
i.e. change toh(n,β€˜A’,β€˜B’,β€˜C’) to toh(n,β€˜A’,β€˜C’,β€˜B’) in main() function

Check your output for sample one it’s not exactly same
Check if you can correct it otherwise I will correct and send
Also sorry for the late reply missed the notification

not able to find out my mistake …
although it run perfect on other compiler

@aattuull the code you provided now is perfect passed all the cases

1 Like

but still show segmetation fault on submission

@aattuull
try closing and opening again
also submit here and check
https://hack.codingblocks.com/app/contests/1161/1080/problem
(also submit it , i think you are just running it without providing input)

1 Like

yup now its accpeting after providing custom input