Saturday, August 18, 2018

PRINTING NEXT


  • Problem Description

    Latha and Trisha are friends. They love to play with words. Ishu gives them a task to replace each characters in a string with its next letter. Can you help them to complete this task?
  • CODING ARENA
  • #include <stdio.h>
    #include<string.h>
    int main()
    {
      char ch[100];
      int x,i;
      scanf("%s",ch);
      x=strlen(ch);
      for(i=0;i<x;i++)
      {
       ch[i]=ch[i]+1;
      }
      printf("%s",ch);
      return 0;
    }
        
          
      
      
      

  • Test Case 1

    Input (stdin)
    abc
    
    
    Expected Output
    bcd
  • Test Case 2

    Input (stdin)
    Appa
    
    
    Expected Output
    Bqqb

No comments:

Post a Comment