c++ - Decimal from Integer and Invalid Operands *Updated -



c++ - Decimal from Integer and Invalid Operands *Updated -

i beginner in c++ , assignment wrote code number english language conversion. problem getting decimal integer. upon advice changed void expand double value , changed code getting decimal, , receive "invalid operands of types double , int binary operator %" remainder of code. (value)?

void expand(double); int main() { ...... } void expand(double value) { string const ones[20] = { " ...... " } if(value>1) { double decimalpart = value - (int)value; } else if(value>=1000) { expand(value/1000); cout<<" thousand"; if(value % 1000) .....

void expand(int value)

change above double work

void expand(double value)

also can decimal part lone next after changing above

double decimalpart = value - (int)value;

c++ integer decimal operands

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -