The method is completely wrong. To check if a number, n, is prime, you must check if it divides by any number from 2 up to (n - 1). Your for loop is also not written correctly...
1 2 3 4 5 6
//For loops take this form
//Initialization / Evaluation / Increment
for(i = 1; i < 10; ++i)
So in that for loop there, i is initialized to 1, the for loop checks on beginning every loop if i is less than 10 and if i is not less than 10, breaks out of the loop. It increments i by 1 at the end of each loop.
You would probably want to print something like 'C' in between Ps for composites, otherwise you get just a bunch of PPPPPP without meaning. Do you have now the array with primes flagged already generated with the sieve of eratosthenes and this is totally printing specific or are you still struggling with determining primes like in the thread yesterday?