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

Solutions on MaxInterview for how to get double y dividing 2 integers in c 2b 2b by the best coders in the world

showing results for - "how to get double y dividing 2 integers in c 2b 2b"
Alessandra
25 Apr 2016
1int a {10}, b {3};            //output : 3.333
2double c {};
3c = static_cast<double>(a)/b;
4cout<<c;