Lines Matching refs:have
93 void showanswer(struct unittype * have, struct unittype * want);
636 showanswer(struct unittype * have, struct unittype * want)
638 if (compareunits(have, want)) {
640 showunit(have);
643 else if (have->offset != want->offset) {
647 if (have->quantity)
649 (have->factor + have->offset-want->offset)/want->factor);
652 have->factor / want->factor,
653 (have->offset-want->offset)/want->factor,
654 want->factor / have->factor,
655 (want->offset - have->offset)/have->factor);
658 printf("\t* %.8g\n\t/ %.8g\n", have->factor / want->factor,
659 want->factor / have->factor);
676 struct unittype have, want;
709 initializeunit(&have);
710 addunit(&have, havestr, 0, 1);
711 completereduce(&have);
715 showanswer(&have, &want);
723 initializeunit(&have);
725 printf("You have: ");
731 } while (addunit(&have, havestr, 0, 1) ||
732 completereduce(&have));
744 showanswer(&have, &want);