How would one best tell how many times a string could be divided into blocks. Like say how many times a string 128 can be divided into 32 parts, I've made an attempt to do this however it is rather sketchy.
I'm not sure if this is what you're talking about but here's what I made real quick.
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
usingnamespace std;
int main()
{
int size = 32;
int blocks = 0;
cout << "Please give me a number of blocks." << endl;
while (cin >> blocks)
cout << "The number of times the blocks can be divided by 32 is " << blocks/size << " with a remainder of " << blocks%size << endl;
}
If you put in 50 you'll get a result of 1 with a remainder of 18.