#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int Judgment(char*);
void Transform1(char* sp,char* dp);
void Transform2(char* sp,char* dp);
void main()
{
char* sp,* dp = malloc(100);
char str[100];
sp = gets(str);
switch(Judgment(sp))
{
case 3 :
puts(sp);break;
case 2 :
printf("Error!\n");break;
case 1 :
Transform2(sp,dp);break;
case 0 :
Transform1(sp,dp);break;
default :
printf("");
}
}
int Judgment(char* sp)
{
int i;
int fl1 = 0,fl2 = 0;
if(*sp == '_' || isupper(*sp)) return 2;
for(i=0;*sp != '\0';sp++,i++)
{
if(isupper(*sp))
{
fl1 = 1;
continue;
}
if(*sp == '_')
{
if(*(sp+1) == '_')
{
return 2;
break;
}
else fl2 = 1;
}
}
sp--;
if(*sp == '_') return 2;
sp++;
sp -= i;
if(fl1 != fl2)
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int Judgment(char*);
void Transform1(char* sp,char* dp);
void Transform2(char* sp,char* dp);
void main()
{
char* sp,* dp = malloc(100);
char str[100];
sp = gets(str);
switch(Judgment(sp))
{
case 3 :
puts(sp);break;
case 2 :
printf("Error!\n");break;
case 1 :
Transform2(sp,dp);break;
case 0 :
Transform1(sp,dp);break;
default :
printf("");
}
}
int Judgment(char* sp)
{
int i;
int fl1 = 0,fl2 = 0;
if(*sp == '_' || isupper(*sp)) return 2;
for(i=0;*sp != '\0';sp++,i++)
{
if(isupper(*sp))
{
fl1 = 1;
continue;
}
if(*sp == '_')
{
if(*(sp+1) == '_')
{
return 2;
break;
}
else fl2 = 1;
}
}
sp--;
if(*sp == '_') return 2;
sp++;
sp -= i;
if(fl1 != fl2)