I wasn't sure what you meant by "evenly". But first of, intuitively, for this problem to make sense , the "cents part" n must be either 0 or >=10 and at least n must be a multiple of 5 .
So the only...
The code below gives me the maximum odd number and the minimum even number of a list of numbers that the user type. However, for the loop to stop the user needs to type 1000. Is there a better way...
I think the code is performing how it should, I think the problem is behind the logic (I guess that's the design). I am hoping to get 23 10's, one 5, two 1's ,2 quarters and 3 dimes.
My coin/money change code works when there can be an exact change each time, i.e. when the 1 cent option is available. However, when the change options are only $10, $5, $1, 25 cents and 10 cents, it...
I have two functions bool check_key(string cKey, string eKey) and bool check_digit(char digit1, char digit2), and I have declared both of them globally (is this the right terminology?) right after...
I am trying to add matrices a and b. I am getting an error in the "add" function, probably because I have m[i] in it, and m is not an array. What is the correct way of writing the "add" member...
However, I am running into this new problem: In the void Frequency function that I had , besides calculating the frequency, it was also calculating the number of...
Alright, I see what you are saying. But technically speaking, in my method, I write the same amount of text "cout<< / file2<<" - wise (except that I have 2 different but similar functions to call as...
Could you give me an example of a function of type double, float,or char that can return some text both for the screen and for the ouput file. I tried earlier, and I couldn't make it work, that's why...
I cannot use the same function Frequency when printing out on the output file. I had to create a copy of the Frequency function and in the new one, I replaced...
Thanks, I can see it is an error. If I wanted to get the results of void Frequency(alphabet[p], num, a) on the screen, I would just write
Frequency(alphabet[p], num, a) ; (with no cout<<). However,...
So I am writing this code that analyzes a file called "analysis.txt" and prints out in an ouput file (called "report.txt") the results of the analysis, i.e.,(the frequency of all alphabet letters...