Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Created April 24, 2015 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerioagjr/2f4102726b9e7bf637f6 to your computer and use it in GitHub Desktop.
Save rogerioagjr/2f4102726b9e7bf637f6 to your computer and use it in GitHub Desktop.
Caractere
#include <cstdio> // scanf e printf
int main(){
int n; // declaro a variável n
scanf("%d", &n); // leio o valor de n
printf("%c\n", 'a'-1+n); // imprimo o caractere de código 'a'-1+n
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment