Find the concentration of a solution using given Mass and Volume | C # program to find concentration of a solution using given Mass and Volume ; Function to calculate concentration from the given mass of solute and volume of a solution ; Driver code
using System ; class GFG { static double get_concentration ( double mass , double volume ) { if ( volume == 0 ) return - 1 ; else return ( mass / volume ) * 1000 ; } public static void Main ( ) { double mass , volume ; mass = 100.00 ; volume = 500.00 ; Console . Write ( get_concentration ( mass , volume ) ) ; } }