Advertisement
boyan16-z

From letters to numbers

Mar 21st, 2018
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. int main() {
  6. char str[255];
  7. int i;
  8. printf("Input: ");
  9. gets_s(str);
  10. for (i = 0; i < strlen(str); i++)
  11. str[i] = str[i] + 'A' - '0';
  12. printf("%s\n", str);
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement