Posts by Ruan • 95 points
14 posts
-
2
votes2
answers231
views -
1
votes2
answers142
viewsA: I’m having repeat problems in python
Note that in python your identation have an impact on the algorithm, so it is easy to notice your error... note that: while True: nome = str(input('nome do aluno: ')) is a loop whose scope has only:…
-
0
votes3
answers64
viewsA: when I put a small number in my algorithm it works, but if the number is large the program returns 0
I started to redo the code from scratch and managed to solve the problem, here is the code optimized and functional: #include <stdio.h> #include <stdlib.h> #include…
-
0
votes3
answers64
viewsQ: when I put a small number in my algorithm it works, but if the number is large the program returns 0
when I put a small number in my algorithm it works, but if the number is large the program returns 0, I tried to put unsigned int, long, etc and it didn’t work... Here’s the code: #include…
-
2
votes3
answers1056
viewsA: How to convert an integer vector to an integer-only variable?
discovered, functions as simple mathematics, where the last position of the vector is the unit, the penultimate to ten and so on, as in the above case: teste[4] = teste[4]*1; teste[3] = teste[3]*10;…
-
-1
votes3
answers1056
viewsQ: How to convert an integer vector to an integer-only variable?
I need to convert an integer vector to a single variable, example: int teste[] = {2, 3, 5, 6}; for int result = 2356; how to do this? NOTE: I don’t have the vector size (+ - dynamic)…
-
0
votes1
answer95
viewsQ: I need help solving this exercise (e.g.: 8 project Uler)!
The question asks that in a number of 1000 digits we find the largest product of 30 adjacent numbers (question link), I know I can do this just by playing a 1000-digit string and checking if 1 to 5…
-
0
votes1
answer880
viewsQ: Onchange event does not work in <select>
The event change is not working. It does not change the values (.value) that were placed in the Javascript code: function trimestre(){ var op = document.getElementById('tt').Value; if(op == 1){…
-
0
votes2
answers77
viewsQ: How to hide another program window?
I am making a program that opens other processes on the computer for its operation, however, depending on the form to be used by the user, many windows will be opened unnecessarily. How to hide…
-
0
votes2
answers156
viewsA: How to create a file within the users directory?
Bolei uma solução simples mas funcional, para quem não é tão expert assim, mas só funciona no windows acredito... basta apenas pegar o nome de username de quem está logado no pc usando a função…
-
0
votes2
answers156
viewsQ: How to create a file within the users directory?
For each different pc, the Users/User folder tbm is different, I want to know how to create a file inside that directory. I was trying and I got to the following code: FILE *bug; bug =…
-
-1
votes1
answer87
viewsQ: Code takes time to execute, points error but then displays the result
Code on net Beans runs, but it takes time to show the result. Error appears in the netbeans console, but if I leave the program running after a while it shows the result: #include <stdio.h>…
-
2
votes2
answers477
viewsA: I need help to calculate the factorial in ascending and descending order in an equation!
I managed in a way not so practical but functional and solved my problem: #include <stdio.h> #include <stdlib.h> #include <math.h> /* * Faça um programa que leia o número de termos…
-
0
votes2
answers477
viewsQ: I need help to calculate the factorial in ascending and descending order in an equation!
I need to resolve this question: Make a program that reads the number of terms and a positive value for X. Calculate and show the value of the following series: * S = (-X2/! 1) (+X3/2! ) (-X4/3! )…