Ir ao conteúdo
  • Cadastre-se

jbdj

Membro Júnior
  • Posts

    11
  • Cadastrado em

  • Última visita

posts postados por jbdj

  1. Boa Noite Pessoal,

     

    Alguém poderia me ajudar com o problema abaixo:

    The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also hasa rather interesting sub-string divisibility property.Let d1 be the 1st digit, d2 be the 2nd digit, and so on. In this way, we note the following:d2d3d4=406 is divisible by 2d3d4d5=063 is divisible by 3d4d5d6=635 is divisible by 5d5d6d7=357 is divisible by 7d6d7d8=572 is divisible by 11d7d8d9=728 is divisible by 13d8d9d10=289 is divisible by 17Find the sum of all 0 to 9 pandigital numbers with this property.

    Não entendi o que o problema está pedindo que eu faça.

     

    Alguém poderia me explicar e me ajudar a fazer?

     

    Agradeço Antecipadamente!

  2. Bom Dia Pessoal,

     

    Tenho o seguinte código:

    <?php    class generateHTML {                private static $instance;        private $title;        private $head;        private $page;        private $header;        private $footer;        private $article;        private function __construct() {                        $this->title = "Corollarium";        }                public static function getInstance() {                        if(!isset(self::$instance)) {                                $c = __CLASS__;                self::$instance = new $c;            }                        return self::$instance;        }        public static function setTitle($title) {                        $this->title = $title;        }                public static function getTitle() {                        return $this->title;        }                public static function setHead($head) {                        $this->head = $head;        }                public static function getHead() {                        return $this->head;        }                public static function setHeader($header) {                        $this->header = "<header>" . $header . "</header>";        }        public static function getHeader() {                        return $this->header;        }                public static function setFooter($footer) {                        $this->footer = "<footer>" . $footer . "</footer>";        }                public static function getFooter() {                        return $this->footer;        }                public static function setArticle($article) {                        $this->article = "<article>" . $article . "</article>";        }                public static function getArticle() {                        return $this->article;        }        /*public static function render() {                        $page = "<html>" . "<head>" . self::getHead() . "<title>" . self::getTitle() . "</title>" . "</head>";            $page = $page . "<body>" . $this->getHeader() . $this->getArticle() . $this->getFooter() . "</body>";            $page = $page . "</html>";                        return $page;        }*/    }        $exemplo = generateHTML::getInstance();    //print $exemplo->render();    $exemplo->setHead("adjflaskjfd");    //var_dump($exemplo === generateHTML::getInstance());?>

    Mas quando executo $exemplo->setHead("adjflaskjfd"); ele gera o erro da figura em anexo.

     

    Alguém poderia me ajudar?

     

     

    post-620290-0-42541700-1437726502_thumb.

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!