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, 22.06.2019 14:40
For this assignment you have to write a c program that will take an infix expression as input and display the postfix expression of the input. after converting to the postfix expression, the program should evaluate the expression from the postfix and display the result. what should you submit? write all the code in a single file and upload the .c file. compliance with rules: ucf golden rules apply towards this assignment and submission. assignment rules mentioned in syllabus, are also applied in this submission. the ta and instructor can call any students for explaining any part of the code in order to better assess your authorship and for further clarification if needed. problem: we as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). in computer's language, however, it is preferred to have the operators on the right side of the operands, ie. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix write a program that takes an "infix" expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % ( example infix expression: (7-3)/(2+2) postfix expression: 7 3 2 2 result: rubric: 1) if code does not compile in eustis server: 0. 2) checking the balance of the parenthesis: 2 points 3) incorrect postfix expression per test case: -2 points 4) correct postfix but incorrect evaluation per test case: -i points 5) handling single digit inputs: maximum 11 points 6) handling two-digit inputs: 100 percent (if pass all test cases)
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 24.06.2019 15:20
Local area networks use many of the same network technologies and the internet, only on a smaller scale. devices that access lans are equipped with a network interface that contains circuitry for wireless or wired connections. devices also have a physical address, in addition to the ip addresses acquired from a dhcp server. the most popular wired technology is . the most popular wireless technology is , which can be configured as a(n) or star topology. setting up a lan and configuring its router is fairly easy. the first step is to change the standard to one that is secure. next, create a(n) that uniquely identifies the network by name. it is also important to activate wireless to prevent wireless signals from being intercepted during transmission. a limited-access network can be created for visitors to use. by activating , the router will be able to assign ip addresses to each device that joins the network. to connect to a secure lan that is protected by encryption, an encryption , or password, is required. lans can be used to access data collected by iot devices and the networks that tie these devices together. technologies such as rfid, nfc, bluetooth smart, zigbee, and z-wave offer -power links, essential for battery-powered devices that can’t expend excess amounts of energy transmitting data.
Answers: 1
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, 16.10.2020 20:01
question
Mathematics, 16.10.2020 20:01