fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void input() {
  5. static char a = 0, b = 0;
  6. // 48 - 0
  7. // 49 - 1
  8. // 50 - 2
  9. cout<<":: "; // TO DO
  10. while(scanf("%c", &a), a < 48 || a > 50) {
  11. cout<<":: ";
  12. }
  13. while(scanf("%c", &b), b < 48 || b > 50) {
  14. cout<<":: ";
  15. }
  16. }
  17. int main() {
  18. input();
  19. return 0;
  20. }
Success #stdin #stdout 0s 3344KB
stdin
2 3 1
stdout
:: :: :: ::