float percentrelation = Individualrelatonshipdegree / relationshipdegree * 100;
This simple operation returns 0 while the value in Individualrelationshipdegree variable is 19 and in the relationshipdegree is 35. but it still returns 0. don’t understand this problem. Any help will be appreciated.
You are doing integer division. try