Sure! You can test every value, instead. I'd start at N, rather than 1.
What sort of "other method" did you have in mind?
With any method, since there is always at least one prime between N and 2N, start from N and decrement, when you reach N/2. if N is prime, you save time. in this case the largest prime lesss than N is 1.
If N is large, the divide test will be tedious. Use a primalty test (Rabin, or Lucas or else. It will be much faster