I've looked around on the net and in a couple books, but I can't find a way in C++ to divide two floats. Anybody have ideas?

Printable View

- 07-13-2002mkappelquestion: how to divide two floats
I've looked around on the net and in a couple books, but I can't find a way in C++ to divide two floats. Anybody have ideas?

- 07-13-2002SilentStrike
It's simple.. make 2 floats and use the division operator.

Code:`#include <iostream>`

int main() {

float a = 5.f;

float b = 2.2f;

float c = a/b;

std::cout << c << '\n';

return 0;

}