Questions tagged as 'algoritmo'

1
answer

Algorithm for AST [duplicate]

I'm creating a programming language in C ++. I made a simple lexer, which works perfectly fine for now. out 5 + 7 * 3 My lexer turns this into: kw: out num: 5 op: + num: 7 op: * num: 3 nl Now I need to create an AST (abstract synt...
asked by 03.08.2017 / 23:09
2
answers

Algorithm to calculate life time in days

I wanted to know how many days I've lived, between the date I was born to this day, including leap years. I'm doing the following, but I do not know how to finish: #include<stdio.h> #include<locale.h> int main(){ setlocale(LC_ALL,...
asked by 29.03.2017 / 17:55
3
answers

How to make a count of how many candidates are on this page? Python 3.6

Simple thing. I need to make a count of how many candidates in the table on this page, for example: link  For example there are 110 names, but I need to get this number and I have to do it in a huge number of pages with the same structure. Her...
asked by 02.03.2017 / 00:21
1
answer

Using LOG in VISUALG Functions

When using LOG in visualG a problem is occurring, I need to split a value entered by the user, by log 2 in base 10. But he does not do this error. funcao menu_8():inteiro var logaritmo :real inicio para contador de 0 ate 12 faca logaritm...
asked by 17.06.2016 / 15:43
1
answer

Time Estimation Calculation

I'm making a calculator for calculating time for any distance on my site, but my question is in the execution algorithm. The formula is as follows: tempo previsto = tempo real x distância prevista / distância do...
asked by 02.06.2016 / 01:46
1
answer

How to calculate NPV (NPV) and IRR using Javascript?

I'm having an economically viable CBT project using PHP + Javascript, well, I can calculate all the indicators I need, minus NPV (NPV) and IRR, I saw a library called finance.js but I could not integrate it into my script can anyone help...
asked by 07.11.2015 / 02:36
2
answers

How to define a function that calculates the lowest speed?

The program must have a function that calculates the lowest speed among those that are calculated from the data provided. The user must provide as input, 9 values, 3 in 3, which correspond to speed, acceleration and elapsed time for 3 different...
asked by 04.04.2016 / 20:26
1
answer

Decomposition in cousins

Hello everyone, I am learning C ++ for Data Structure and have some error in the code that is creating an infinite loop. #include <stdio.h> int fatores(int a[], int n, int *x) { int primo = 2; // primeiro primo int qtdzero =...
asked by 29.08.2015 / 22:45
1
answer

Remove odd numbers from a stack

In C, how do you remove only odd numbers from a stack? I was thinking of removing item from item and passing to a vector, however the stack size is not given.     
asked by 05.07.2015 / 03:39
1
answer

How to traverse a 2-D array in C and display?

In this code, I have an array of two dimensions, I started and I want to start with printf, but I do not know how to do it: #include <stdio.h> #include <stdlib.h> int main() { int i; int matriz1 [3][4] = {1, 2, 3, 4, 5, 6,...
asked by 17.05.2015 / 02:33