How to use digit after decimal in c++ for calculation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use digit after decimal in c++ for calculation

if we want to divide something and get a decimal after 2 number so how can i get that number after decimal get added atomatically

20th May 2018, 10:13 AM
Badal
Badal - avatar
1 Answer
+ 1
Your question is a bit unclear, do you want to do this? #include <iostream> int main() { double a, b; std::cin >> a >> b; std::cout << a / b; }
20th May 2018, 10:16 AM
Timon Paßlick