case conversion

Description:

Kiran is a programmer he is interested to create a program to convert upper case letters present in a string into lower case letters. Test Case 1 Input (stdin) RajKUMAR Expected Output rajkumar Test Case 2 Input (stdin) maniKANDAN Expected Output manikandan

Program :

#include <iostream>

#include<string.h>

using namespace std;

int main()

{

char s[50],ch;

  int i;

  cin>>s;

  for(i=0;i<strlen(s);i++)

  {

    if(s[i]>=97 && s[i]<=122)

    ch=s[i];

    else

      ch=s[i]+32;

    cout<<ch;

  }

return 0;

}