Need help with sqrt

Hello, I am a highschool student and I want to make a program that calculates the square of a triangle with Heron's theoreme.When I try to make something like
K=sqrt(a+b+c);
cout<<K;
it doesn't show the right answer. for expample if I type a=13,b=14,c=15 it answers 6 which is not right because 13+14+15 = 42; Thank you in advance!
Define K as double not int
Thanks a lot man!
Topic archived. No new replies allowed.