Alex
2012-09-12 01:43:31 UTC
I have this code which i need some help with:
printf("Please input the total weight in pounds of locamotive (W): ");
scanf("%d", &W);
I would like to add an if condition
Basically, if the input contains a "," comma I would like the program to remove the comma
Example:
if someone inputs "200,000" i want the program to remove the comma and store the variable W without the comma as "200000"
How do i do this?
Thanks