User281315223 posted
Well you would first likely need to determine some type of formula for calculating what you need (as I am not sure what all a CO2 calculator would entail) :
public double CalculateYourCO2(int x, int y, int z)
{
// do your magic here
}
After you have your formula defined, you would likely just want to build some type of form that would allow your user to type in certain parameters that they would be using (e.g. room dimensions, flow rates, etc.). When the user submitted the form,
you could read these values, pass them into your formula and return your calculation results to the user :
[HttpPost]
public ActionResult Index(int parameterName1, int parameterName2, int parameterName3)
{
// read your values
var result = CalculateYourCO2(parameterName1, parameterName2, parameterName3);
// Do something with your result here
return Content($"Your result is {result}!");
}
I would highly recommend reading through a very basic tutorial on MVC on how to make a basic page that can accept input and how to handle output and then going from there. The
Learn section of this site is a great place to get started.