this code chang capter letter to small and small to capter
Code:
 
#include <iostream>
using namespace std;

int main(){
    string line;
   cout<<"Enter your a  text: ";
    if ( getline ( cin, line ) ) {
        for ( string::size_type i = 0; i < line.size(); i++ )
            if (isupper(line[i]))
                 line[i]=tolower(line[i]);
            else if (islower(line[i]))
                 line[i]=toupper(line[i]);
        cout<< line <<'\n';
    }
  
return 0;
}
BUT HOW I CAN USE FUNCTION IN THIS PROGRAMME_??

Last edited by shabbir; 30Dec2010 at 16:52.. Reason: Code blocks