Answers for "how to get double y dividing 2 integers in c++"

C++
1

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;
Posted by: Guest on August-15-2021

Code answers related to "how to get double y dividing 2 integers in c++"

Browse Popular Code Answers by Language