Hi, I'm confused when the output given to me is 3, when I want it to be 3.75. I know if I do 15 %4 I would get a 3 but why would the following code also output a 3?
sorry if its an obvious answer
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
usingnamespace std;
int main()
{
float x;
x = 15/4;
cout << x;
return 0;
}