fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. struct int_pair
  6. {
  7. int first, second;
  8. };
  9.  
  10. struct int_pair function (const int a)
  11. {
  12. const int value = a * 2;
  13. return (struct int_pair) { value / 10, value % 10 };
  14. }
  15.  
  16. int main()
  17. {
  18. struct int_pair p = function(150);
  19. printf("%d %d\n", p.first, p.second);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
30 0