Well I excerpted as much as possible to make it easier to determine the problem, and I'm sure it's something really simple, but I just started programming a week ago and I'm just trying to learn one problem at a time, and this one has me stumped
Why won't it give me a percentage? It outputs 100 if both arrays are set to 1, but any other combination yeilds 0. And it's kind of important that I use arrays here.. Can anyone help?Code:#include <iostream> using namespace std; int main() { int possible [10]; int total [10]; possible [1] = 5; total [1] = 7; cout<<possible [1] / total [1] * 100; cin.get(); }