i am getting a wrong output
This sentence tells us nothing, tell us WHAT output you have and how it is different from what you expected. THAT would provide us possibly more info to help solve your question.
The multiply and divide operators are of equal precidence for C/C++ compilers. What order they are evaluated it is up to the compiler. IE, your 400*400/400 expression can be evaluated as 400*(400/400) == 400, or (400*400)/400 == 400. Gee, they compute the same. If you aren't getting 400 as a result, then something else is going on!