subject

1. scrieţi un program care citeşte un număr natural n şi determină produsul cifrelor impare ale lui n. de exemplu, pentru n = 23453, produsul este 45.

2.scrieţi un algoritm care citeşte un număr natural n apoi n numere întregi. să se determine câte din cele n numere întregi sunt strict pozitive şi divizibile cu 7. de exemplu, pentru n = 7 şi numerele -28, 21, 77, 15, -1, 42, -7 se va afişa 3 (acestea sunt 21, 77, 42).

3.scrieţi un algoritm care citeşte un număr natural n şi calculează suma:
s = 1/(1*2) + 1/(2*3) + 1/(3*4) + … + 1/((n-1)*n)

4. se citeşte un număr natural n. să se calculeze suma divizorilor proprii ai lui n. de exemplu, pentru n=12, suma divizorilor proprii este 2+3+4+6=15

5. se citeşte un număr natural n şi apoi n numere întregi. să se calculeze şi să se afişeze suma numerelor naturale cuprinse între 10 şi 100. de exemplu, dacă n=5 şi apoi se citesc 30, –2, 14, 200, 122, atunci suma va fi 44 (adică 30 + 14).

6. se citeşte un număr natural n de maximum 4 cifre. câte cifre sunt în toate numerele de la 1 la n? de exemplu, pentru n=14 există 19 cifre, iar pentru n=9 sunt 9 cifre.

7. se citesc numerele naturale n şi s, unde n poate fi 2, 3, 4 sau 5. să se afişeze toate numerele de n cifre care au cifrele în ordine strict crescătoare, iar suma cifrelor este s. de exemplu, pentru n=2 şi s=10, se vor afişa 19, 28, 37, 46.

8. se consideră şirul 1, 1, 2, 3, 5, 8, 13, în care primii doi termeni sunt 1, iar orice alt termen este obţinut din suma precedenţilor doi. scrieţi un algoritm care citeşte un număr natural n şi afişează primii n termeni ai acestui şir. de exemplu, pentru n = 6, se vor afişa: 1, 1, 2, 3, 5, 8.

9. să se scrie un algoritm care citeşte două numere naturale n1 şi n2 şi care afişează mesajul „da” dacă suma pătratelor cifrelor lui n1 este egală cu suma cifrelor lui n2 sau „nu” în caz contrar. de exemplu, pentru n1=232 şi n2=881 se va afişa „da”, iar pentru n1=45 şi n2=12 se va afişa „nu”.

10. să se scrie un algoritm care citeşte un număr natural n şi afişează mesajul „da” dacă toate cifrele lui n sunt distincte, sau „nu” dacă n nu are toate cifrele distincte. de exemplu, pentru n=37645 se va afişa „da”, iar pentru 23414 se va afişa „nu”.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
You know the right answer?
1. scrieţi un program care citeşte un număr natural n şi determină produsul cifrelor impare ale lui...
Questions
question
Mathematics, 22.06.2019 18:20
question
Mathematics, 22.06.2019 18:20
question
History, 22.06.2019 18:20
question
Mathematics, 22.06.2019 18:30
Questions on the website: 13722363