hey, im 15 years old and just starting out learning C. my question is this:
when i use "atoi" to change a character variable to an integer its works fine. however when i use it to change a character variable into a float variable it still comes out as an integer and i cannot place a decimal. can someone help me figure out how to make this work. thanks.
here is a small code of mine to show you what i mean.
int main(int argc, char *argv)
printf(" addition program.\n");
printf("%f+%f=%f", num1, num2, ans);
[code][/code]tagged by Salem