0% found this document useful (0 votes)
356 views

Flowgorithm Ciklusi Zadaci

The document lists 12 programming tasks: 1) Print the first 100 natural numbers 2) Print all odd natural numbers less than 100 that are divisible by 3 3) Print all 3-digit Armstrong numbers, where the sum of the cubed digits equals the number 4) Print all 3-digit numbers divisible by the number formed by removing the middle digit The remaining tasks involve calculating factorials, products, sums, powers and testing for prime numbers.

Uploaded by

Miljan Veljović
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
356 views

Flowgorithm Ciklusi Zadaci

The document lists 12 programming tasks: 1) Print the first 100 natural numbers 2) Print all odd natural numbers less than 100 that are divisible by 3 3) Print all 3-digit Armstrong numbers, where the sum of the cubed digits equals the number 4) Print all 3-digit numbers divisible by the number formed by removing the middle digit The remaining tasks involve calculating factorials, products, sums, powers and testing for prime numbers.

Uploaded by

Miljan Veljović
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Zadaci:

1. Napisati program koji ispisuje prvih 100 prirodnih brojeva.

2. Napisati program koji ispisuje sve prirodne brojeve manje od 100 koji su neparni i deljivi sa 3.

3. Napisati program kojim se štampaju svi trocifreni Amstrongovi brojevi. Broj je Amstrongov
ako je jednak zbiru kubova svojih cifara.

4. Napisati program kojim se štampaju svi trocifreni brojevi koji imaju osobinu da su deljivi
brojem koji se dobija izbacivanjem srednje cifre.

5. Napisati program koji za uneti prirodan broj n računa njegov faktorijel:

𝑛! = 1 ∗ 2 ∗ 3 ∗ … ∗ (𝑛 − 2) ∗ (𝑛 − 1) ∗ 𝑛

6. Napisati program koji za uneti prirodan broj n računa:

𝑛 ∗ (𝑛 + 1) ∗ (𝑛 + 2) ∗ … ∗ (𝑛 + (𝑛 − 1)) ∗ 2𝑛

7. Za uneti broj n izračunati sumu:


1 1 1 1
2
+ 2
+ 2
+ ⋯+
(2 ∗ 1 + 1) (2 ∗ 2 + 1) (2 ∗ 3 + 1) (2𝑛 + 1)2

8. Za uneti broj n izračunati proizvod:


(3 ∗ 12 + 1) ∗ (3 ∗ 22 + 1) ∗ (3 ∗ 32 + 1) ∗ … ∗ (3n2 + 1)

9. Za uneti prirodan broj n i uneti realan broj a računa n-ti stepen broja a:
𝑎𝑛 = ⏟ 𝑎 ∗ 𝑎 ∗ …∗ 𝑎
𝑛
10. Napisati program koji za uneti prirodan broj n ispituje da li je broj prost. Broj je prost ako je
deljiv samo sa 1 i sa samim sobom.

11. Napisati program kojim se štampaju svi prosti brojevi manji od 100.

12. Napisati program koji za unet prirodan broj n ispisuje njegov zbir cifara. (Napomena. broj
cifara broja nije unapred poznat)

You might also like