I\'m currently writing a program that requires a preview of a live display, but the preview, of course, is scaled down. However, when I scale the PictureBox
down, t
Make sure division result is double
double ratio = (double) 4 / 3; // double division
and no need to set your input values to double.
var num1 = // an integer number
var num2 = // an integer number
//result is integer, because of integer/integer uses 'integer division'
double result = num1 / num2;
//result is double , because of you forced to 'double division'
double result = (double) num1 / num2;