Given two values M and V representing the mass of solute and volume of a solution, the task is to calculate the concentration of the solution.
Input: M = 100.00, V = 500.00
C = 1000 * (100 / 500)
The concentration of solution is 200
Input: M = 1.00 V = 1000.00
Approach: The concentration of a solution is defined as the mass of solute in (gram) per liter of solution.
C = 1000 * (M / V)
Where M = Mass of solute and V = Volume of solution.
Hence, in order to solve the problem, follow the steps below:
- Calculate the concentration of solution using the formula C = 1000* (M / V).
- Print the result.
Below is the implementation of the above approach:
Time Complexity: O(1)
Auxiliary Space: O(1)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Concentration of juice after mixing n glasses in equal proportion
- Program to Calculate Body Mass Index (BMI)
- Program to find the Area and Volume of Icosahedron
- Program to find volume and surface area of pentagonal prism
- Program to find Surface Area and Volume of Octagonal Prism
- Program for Volume and Surface Area of Cube
- Program for Volume and Surface Area of Cuboid
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
- Calculate Volume and Surface area Of Sphere
- Calculate volume and surface area of a cone
- Program to calculate area and volume of a Tetrahedron
- Program to calculate Volume and Surface area of Hemisphere
- Program for Volume and Surface area of Frustum of Cone
- Surface Area and Volume of Hexagonal Prism
- Program for volume of Pyramid
- Program to calculate volume of Ellipsoid
- Program to calculate volume of Octahedron
- Calculate Volume of Dodecahedron
- Minimum volume of cone that can be circumscribed about a sphere of radius R
- Generate an array using given conditions from a given array
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.