Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Created April 24, 2015 01:47
Show Gist options
  • Save rogerioagjr/499d84cd153b97652d11 to your computer and use it in GitHub Desktop.
Save rogerioagjr/499d84cd153b97652d11 to your computer and use it in GitHub Desktop.
scanf
#include <cstdio> // scanf e printf
int main(){
char frase[30]; // declaro a string frase
scanf("%[a-z A-Z]", frase); // leio a frase, ate o primeiro caractere indsejado
printf("%s.\n", frase); // imprimo a frase
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment