Submission #1369945


Source Code Expand

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
vector<int> d;
int main(){
	string st;
	cin>>st;
	if('a'<=st[0]&&st[0]<='z')st[i]+=32;
	for(int i=1;i<st.length();i++){
		if('A'<=st[i]&&st[i]<='Z')st[i]-=32;
	}
	cout<<st<<endl;
	return 0;
}

Submission Info

Submission Time
Task B - 名前の確認
User SugarDragon5
Language C++14 (GCC 5.4.1)
Score 0
Code Size 300 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:31: error: ‘i’ was not declared in this scope
  if('a'<=st[0]&&st[0]<='z')st[i]+=32;
                               ^