Segmentation fault

My code logic is correct, it showed correct output in my ide but here its showing error, dont know why.

hello @luniatarun22 please share your code by saving it on ide.codingblocks.com .