Determination of carbon and sulfur in steels