Gigantopithecus
Diamond Member
Sorry, I'm a biologist trying to learn how to program perl and this is my first baby step, and for some reason my friend's unix box won't let me log on.
Here's the script:
#!/usr/bin/perl
print "How many moles of solute do you have?\n";
$moles=<STDIN>;
print "How many liters of solution do you have?\n";
$solution=<STDIN>;
$totalmolarity=$moles/$solution;
print "The molarity of your solution is $totalmolarity\n";
All it should do is calculate the molarity of a solution given x moles of solute & y liters of solution.
Here's the script:
#!/usr/bin/perl
print "How many moles of solute do you have?\n";
$moles=<STDIN>;
print "How many liters of solution do you have?\n";
$solution=<STDIN>;
$totalmolarity=$moles/$solution;
print "The molarity of your solution is $totalmolarity\n";
All it should do is calculate the molarity of a solution given x moles of solute & y liters of solution.