Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to get double y dividing 2 integers in c++

int a {10}, b {3};            //output : 3.333
double c {};
c = static_cast<double>(a)/b;
cout<<c;
 
PREVIOUS NEXT
Tagged: #double #dividing #integers
ADD COMMENT
Topic
Name
9+7 =