fork download
  1. #include <stdio.h>
  2.  
  3. int main (void)
  4.  
  5. {
  6. int number;
  7. printf ("Type in your number: "); scanf ("%i", &number);
  8. if ( number < 0 ) number = -number;
  9. printf ("The absolute value is %i\n", number); return 0;
  10. }
  11.  
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
Type in your number: The absolute value is 32764