fork download
  1. #include <stdio.h>
  2. int main(){
  3. int n;
  4. scanf("%d", &n);
  5. if (n<0){
  6. n=-n;
  7. }
  8. printf("%d", n%10);
  9. return 0;
  10. }
Success #stdin #stdout 0s 5320KB
stdin
-234
stdout
4