why isn't my program working??

char ch;
int countspace=0;
cout << "Please enter a line of text, ";
cout << "followed by a return: ";
cout << endl;
cin.get(ch);
while (ch == '\n')
{
if (ch == ' ')
countspace++;
if(countspace > 0 && ch != ' ')

ch= toupper(ch);
cout <<ch;
countspace = 0;
}