Use the float or double types (a double uses twice as much memory as a float so it's more accurate).
1 2 3 4 5 6 7 8 9 10
#include <iostream>
int main()
{
float a = 3;
float b = 2;
float c = a / b;
std::clog << c << '\n';
}
1.5
Also is there any place in C++ environment to help us, (like help in matlab or maple)
There is no "C++ environment". All you really need is a text editor (even Notepad will do) and a C++ compiler, most of which you run from the Command Prompt.
You can, however, use an IDE (Integrated Development Environment) such as Visual Studio, and then you may have access to Online Help or other documentation.
Welcome to this site! You will find the C++ Documentation and Reference listed in the menu on the left, in addition to asking your questions here in the Forum.