lógica

Algorithm for traversing a vector

So I'm having a simple logic problem but I can't find a good solution. Problem: I'm wanting to scroll through a log file (o ... } a++; // contador para parar o while. } return 0; } Any suggestions to better solve this problem?

loop For, R - include function in For and save result in an object

install.packages("xlsx") install.packages("stringr") library(xlsx) #pacote para ler os arquivos do excel library(stringr) l ... results of these calculations should be saved in a data-frame where each row is the result vector of the function I created.

Galton Board-Central Limit Theorem

the reason for the question is study / learning. Know / apply programming techniques and concepts, turning something "materia ... that is, a draw with different odds, and thus get the result as the "Galton Board". feel free to post your way of doing it.

Drawing strings from an array with weight

My doubt is as follows, I have an array with all cities in the country,+ - 5000 cities, I have a function that draws one of t ... 0.0000...1% , but that would be crazy, it would only make sense in very small arrays anyway my minimum unit in % would be 1.

Finding multiple fulgaps

The purpose of the program is to show only the numbers fulgaps from 0 to 999, a number that must be divisible by the concaten ... 0) { std::cout << Number << std::endl; Number++; } } return 0; }

Convert decimal to binary in Scratch

Pq is not displaying the result on the screen? I tried to convert decimal number to binary in Scratch, but it's not working. Can anyone see what the mistake is?

Inventory control by grouping products of the same type

I am producing a stock control system, but the stock needs to have a grouping system of products with the same SKU, example, ... ving a product with SKU" sk001 "of size" M " do not influence the control of stock the products with SKU" sk001 "of size "G".

Analyze whether a number is even or odd

The program should do: Digite um Número: 12345 1 e ímpar 2 e par 3 e ímpar 4 e pra 5 e ímpar So far I have do ... } This code returns me the inverse: Digite um Número: 12345 5 e ímpar 4 e par 3 e ímpar 2 e pra 1 e ímpar

I cannot enable javascript function [closed]

closed. this question is out of scope and is not currently accepting answers. ... " type="text" /> <button type="button" onclick="agendar()">Agendar</button> </div> Thank you!

Logic of these bitwise operations

It's been a while since I want to start in the world of emulators, I decided to stop trying to make an emulator of a complex ... eration AND, OR, XOR, not etc... I wish I could understand this logic that people use to be able to use in future projects.

Why does x + = y sum the values in an iteration?

I'm not understanding why this code r += v add up the values. I would like someone to explain to me why the output of this Code: for c in range (0, 10): v = int(input("numero: ")) r += v print(f"resultado: {r}")

Convert decimal to binary [closed]

closed . This question needs to be more objective and is not currently accepting answers. ... a programming logic problem, where you have to create a JavaScript function that receives any decimal and converts to binary.

Weighted average with final exam

I need to read 4 Notes with weights of 2, 3, 4 and 1, respectively, for each of these notes and I must show this average acc ... this: Media: 7.3 Aluno aprovado. Aluno aprovado. Media final: 5.3 Ideally, the output is this: Media: 7.3 Aluno aprovado.