#include <stdio.h>
#define MaxLine 80
void main(){          // Change lowercase to uppercase
	int  offset='a'-'A' , i=0 ;
	char str[MaxLine] ;
        gets(str);
	while (str[i] != '\0' ) {
	  if ( (str[i]>='a') && (str[i]<='z') )
		str[i] = str[i]-offset;
	  i++ ;
	}
    printf("new str= %s \n",str);
}
Published in: C++
Download

Related snippets