fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int max(int a, int b);
  5.  
  6. int main(void) {
  7. int a = 5;
  8. int b = 10;
  9.  
  10. int c = max(a, b);
  11. unsigned long int d;
  12.  
  13. if (c < 0){
  14. printf("Error, conversion is not allowed\n");
  15. exit(1);
  16. }else{
  17. d = (unsigned long int)c;
  18. }
  19.  
  20. printf("D = %zu\n", d);
  21. }
  22.  
  23. int max(int a, int b){
  24. return a > b ? a : b - (b + 1);
  25. }
  26.  
Runtime error #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
Error, conversion is not allowed