#include
#include
#include
void fun(char a[])
{
int i;
int t=strlen(a);
for(i=0;i{
if(i%2!=0)
{
if(toascii(a[i])>=97&&toascii(a[i])<=122)
{
a[i]=(char)(toascii(a[i])-32);
}
}
}
puts(a);
}
int main()
{
char a[100];
gets(a);
fun(a);
return 0;
}
#include
void fun( char *ss )
{
int i;
for( i=0;ss[i];i++ )
{
if ( i%2 )
{
if ( ss[i]>='a' && ss[i]<='z' )
ss[i] += 'A'-'a' ;
}
}
}
void main()
{
char s[]="hello world" ;
printf("%s\n", s );
fun(s);
printf("%s\n", s );
}
void fun(char* str){
for (int i=1; i
if (i%2==1&&str[i]<122&&str[i]>96) {
str[i]=str[i]-32;
}
}
}