I mean I can change
double d;
d= atof("99.0");
this with %.2f to ---- 99.0 to 99.00 but how can I take from user an integer and change it %.2f???
what should I write in atof ????
anyone to understand ??? :)
I mean I can change
double d;
d= atof("99.0");
this with %.2f to ---- 99.0 to 99.00 but how can I take from user an integer and change it %.2f???
what should I write in atof ????
anyone to understand ??? :)
:( I can simplfy the question...
I want to take double numbers from user but I want to make it float number on the output........
just put the char array variable name inside atof()
char num[] = "99.0";
float n = atof(num);
>> I want to take double numbers from user but I want to make it float number on the output........
If this is what you wanna do I think AD has given teh solution.. If not you need to simplify your question a li'l further.. :)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.