/* * ask user (at least once), if he gives wrong data, ask him again */ do { scanf("%d", &x); } while (x < 0 && x > 100);