3 solutions

  • 3
    @ 2025-11-16 18:41:32
    #include<bits/stdc++.h>
    using namespace std;
    int main() 
    { 
      char ch;cin>>ch;
      if(ch=='Z')
      {
        ch='B';
      } 
      else if(ch=='Y')
      {
        ch='A'; 
      }
      else
      { 
        ch=ch+2;
      } cout<<ch;
      return 0; 
    }
    
    • 1
      @ 2026-6-17 20:32:20
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          char a;
      	cin>>a;
      	if(a=='Y')
      	{
      		cout<<"A";
      	}
      	else if(a=='Z')
      	{
      		cout<<"B";
      	}
      	else
          {
      		char c=a+2;
      		cout<<c;
      	}
      	return 0; 
      }
      
      • -1
        @ 2025-9-14 14:49:14

        #include<bits/stdc++.h> using namespace std; int main() { char ch; cin>>ch; if(ch=='Z') { ch='B'; } else if(ch=='Y') { ch='A'; } else { ch=ch+2; } cout<<ch; return 0; }

        • 1

        Information

        ID
        17
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        336
        Accepted
        110
        Uploaded By