1

This is a super simple question, but it has me confused.

#include <iostream>

using std::cout;
using std::endl;

int main()
{
     double percentage = (3/100);
     
     cout << percentage << endl;
}

Why does this output zero? I was under the impression that expressions could be stored in variables...

0 Answers0