Mega Code Archive
Check the command line parameter and use it
#include
#include
int main(int argc, char *argv[])
{
double pounds;
if(argc!=2) {
printf("Usage: CONVERT \n");
printf("Try Again");
}
else {
pounds = atof(argv[1]) / 16.0;
printf("%f pounds", pounds);
}
return 0;
}