This condition checks if w [ i ] is any uppercase letter apart from letter . If true then replace it with upper ( letter ) .
else if ( w [ i ] >= ' A ' && [ ] <= ' Z ' ) { w [ i ] = ( char ) ( ( int ) ' A ' + p ) ; } } } Console . WriteLine ( w ) ; }