Exercícios comentados: Revision history

From Applied Science

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

23 January 2025

  • curprev 20:1020:10, 23 January 2025Wikiadmin talk contribs 4,461 bytes +4,461 Created page with "* '''Os dois algoritmos abaixo tentam calculuar <math>x^n</math>. Ambos estão errados. Explique o erro de cada um:''' {| class="wikitable" |style="width: 22em;" |<source lang="c">for (i = 1; i <= n; i++) x = x * i;</source>|| Está multiplicando por um contador que aumenta a cada vez. Para x = 4, temos 4 * 1, depois 4 * 2, depois 8 * 3, ... |- |style="width: 22em;"|<source lang="c">for (i = 0; i < n; i++) x = x * x;</source> || Está calculando o quadrado do número, d..." Tag: wikieditor