After compiling the program I am getting below error
invalid operands of types int and double to binary \'operator%\' at line \"newnum1 = two % (double)10.0
Because % only works with integer types. Perhaps you want to use fmod().
%
fmod()