I don't understand what you're trying to do... You want to get n as a percentage of everything <= 1,000,000?
The reason it is giving you 1 every time is because in n = (n <= 1000000 * 0.2); n <= (1000000 * 0.2) is evaluated. If n is indeed less than or equal to 1,000,000 * 0.2 (200,000) then n is set to 1. Otherwise it is set to 0.
So if you entered 200,001 then you would get 0.
As I say I don't understand what you're trying to get as a result of your program, so explain and I will help more.
Thanks for your reply. What I'm trying to get is a 2% commission if the sale is less than or equal to one million.
The program is supposed to calculate 2% 5% and 7% commission on a given sale value, from 1 million to 2.5 million.
What the program is supposed to do is: The user inputs the total sale value, and the program should calculate the percentage of the commission to the sales person.
I do understand what you mean, but I'm still stuck on how to make the program calculate the percentage.