Saturday, August 18, 2018

ASCII NAME

  • Problem Description

    Write a program which reads your name from the keyboard and output a list of ANCII codes, which represent your name
  • CODING ARENA
  • #include <stdio.h>
    int main(void)
    {
      char n[20];
      int i=0;
      scanf("%s",n);
      while(n[i]!='\0')
      {
        printf(" %d",n[i]); i++;
      }
      return (0);
    }
  • Test Case 1

    Input (stdin)
    SRMUNIVERSITY
    
    
    Expected Output
    83 82 77 85 78 73 86 69 82 83 73 84 89 
  • Test Case 2

    Input (stdin)
    srm
    
    
    Expected Output
    115 114 109 

No comments:

Post a Comment