Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
284 B

#include <stdio.h>
#define MOL_MASS 3.0e-23
#define WATER_QUART_GRAM 950.0
int main (void) {
float quarts;
printf("Enter a amount of water, in quarts: ");
scanf("%f", &quarts);
printf("Number of molecules: %.2e\n", quarts * WATER_QUART_GRAM / MOL_MASS);
return 0;
}