Skip to main content

Order Gate

PC order_gate {
    fn order_gate(amount, limit) {
        if (amount <= 0) {
            return 0;
        }

        if (limit <= 0) {
            return 0;
        }

        if (amount > limit) {
            return 0;
        }

        return 1;
    }
}

String Size

PC string_size {
    fn string_size(a, b) {
        let joined = MC_40.CONCAT(a, b);
        let size = MC_43.LEN(joined);
        return size;
    }
}