It is a program designed to calculate the hardness of water for some specified salts present in the given sample but it can easily be converted for every salt by simply increasing the initialisation part of the program which stores data of salts.
gcc filename.c -o a `pkg-config --cflags --libs gtk+-3.0`
./a