fork download
  1. #include <stdio.h>
  2.  
  3. // pobieranie jednej liczby
  4. int input()
  5. {
  6. int a, ret;
  7. do
  8. {
  9. printf(":: ");
  10. ret = scanf("%d", &a);
  11. } while (!(ret == 1 && a >= 0 && a <= 2));
  12. return a;
  13. }
  14.  
  15. int main()
  16. {
  17. // chciales dwie pobrac
  18. int a = input();
  19. int b = input();
  20. return 0;
  21. }
Success #stdin #stdout 0s 3300KB
stdin
2 3 1
stdout
:: :: ::