okay, firstly, repeat this a 100 times,
"I'll never call main() from other functions"
main() is supposed to be called by the OS, and it will get really angry if you call it instead..!!
so remove all those calls to main() (line no. 31 to 33) and you'll get out of that loop...
oh, btw, you'll have to pass the sides to your calculations() function like this:
void calculations (int side1, int side2, int side3)
{
// Do calculations
}
and offcourse, change the prototype suitably...
P.S: your main logic for triangle checking is flawed...