int main(void) {
	char n[1024];

	// Para cada caso de teste.
	while (scanf("%s", n), !(n[0] == '0' and n[1] == '\0')) {
		if (_11(n)) printf("%s is a multiple of 11.\n", n);
		else printf("%s is not a multiple of 11.\n", n);
	}

	return 0;
}
Exemple #2
0
int main() {
  int _19 = 0;
  struct _31* _1 = NULL;
  struct _31* _32 = NULL;
  while(1){
    char _3[80];
    fgets(_3, 80, stdin);
    if (feof(stdin))  {
      break;
    }
    struct _31 *_2 = malloc(sizeof(struct _31));
    _2->_34 = 0;
    _2->_36 = NULL;
    _19++;
    _2->_33 = strdup(_3);
    if (_1 != NULL) {
      _1->_36 = _2;
      _1 = _2;
    }
    else {
      _1 = _2;
      _32 = _2;
    }
  }
  int** _14 = (int**)malloc(_19 * sizeof(int*));
  int _18;
  for (_18 = 0; _18 < _19; _18++) {
    _14[_18] = (int*)malloc(_19 * sizeof(int));
  }
  struct _31 **_8 = (struct _31**)malloc(_19 * sizeof(struct _31));
  struct _31 *_5 = NULL;
  int _12;
  int _15 = 0;
  for (_12 = 0; _12 < _19; _12+=2) {
    struct _31* _3 = _32;
    _32 = _32->_36;
    struct _31* _4 = _32;
    _32 = _32 ->_36;
    struct _31* _7 = _9(_5, _3->_33);
    if (_7 == NULL) {
      _7 = _3;
      _7 -> index = _15;
      _8[_15] = _7;
      _15++;
      _7 -> _36 = _5;
      _5 = _7;
    }
    struct _31* _6 = _9(_5, _4->_33);
    if (_6 == NULL) {
      _6 = _4;
      _6 -> index = _15;
      _8[_15] = _6;
      _15++;
      _6 -> _36 = _5;
      _5 = _6;
    }
    _14[_6->index][_7->index] = 1;
    _7->_34 = _7->_34+1;
  }
  _11(_8, _15, _14);
  return 0;
}