Posts by AGenaro • 485 points
19 posts
-
0
votes1
answer698
viewsQ: Manipulation of values in input files c . txt code
This is what I need to do Create an algorithm where you calculate through various temperature inputs the percentage outside the variation stipulated as maximum and minimum having as out of +-3…
-
0
votes1
answer4296
viewsQ: Concatenate String into C without using strcat() function
need a help, needed to solve this programming language exercise, would concatenate a string, in case STRING_B in STIRNG_A, without use of ready function, by pointer method. example: ENTRADAS…
-
0
votes1
answer233
viewsQ: Compress array with equal values C
The problem is the following: Make an algorithm that reads an array A[10]. Then remove the duplicate elements by compressing vector A. Finally insert the value zero in the last elements. Show the…
-
0
votes1
answer137
viewsQ: import and export file . txt FILE in C
The algorithm should read from 1000 to 15000 ( 1 thousand to 15 thousand) real numbers, sum all and carry out a average, I made several import processes, and final result export, but none copied.…
-
0
votes1
answer83
viewsQ: FILE function in C
what needs to be done: develop an algorithm where calculates from file input values . txt or values entered by the user, a value in percentage that is outside the allowed, in case +-3 for all cases,…
-
0
votes1
answer47
viewsQ: When copying the code it gives an error using the WHILE function in C
#include <stdio.h> #include <string.h> int main() { int num_key=666; do { puts("\n\n\t*********************************************"); puts("\t* *"); puts("\t* Calculador de temperatura…
-
1
votes2
answers538
viewsQ: How do you test a number and tell if it’s prime or not?
I have a small problem, after the first time the code runs it only shows "NOT PRIME" and no longer shows "PRIME", where "NOT PRIME", would be for non-prime numbers, and "PRIME" for prime numbers.…
-
3
votes1
answer182
viewsQ: Only 2 houses after the comma
I need the final result to show the whole number and two boxes after the comma. It has how to filter, let’s say, this not to show all the decimal places? #include <stdio.h> #include…
-
0
votes2
answers756
viewsA: Problems with calculating "TREE OF LIFE"
RESOLVED: 'cause I’ve solved the problem I’ll put the code here for anyone who wants to see the resolution. #include <stdio.h> void calculaArvoreDaVida() // sub programa { int ciclos; int…
-
4
votes2
answers756
viewsQ: Problems with calculating "TREE OF LIFE"
Good afternoon, I have a problem I need to do the following: Create a program, in C language, that calculates the size of the tree of life, after a certain number of growth cycles, taking into…
-
0
votes1
answer238
viewsA: What happens to variable i in this algorithm? Sequence inversion algorithm
Look at what I know of algorithm, portugol and everything else, if you start at 0 or 1 or 2 whatever, what matters is that you know what you’re doing, going on, what you can do is the following: at…
-
1
votes1
answer1032
views -
2
votes1
answer1158
viewsQ: Using LOG in VISUALG Functions
When using visualG LOG there is a problem, I need to divide a value typed by the user, by log 2 in base 10. Only he doesn’t make it he’s wrong. funcao menu_8():inteiro var logaritmo :real inicio…
-
0
votes1
answer795
viewsQ: Reverse letter box size - VISUALG
I’m having a problem with programming visualG algorithms. need to invert an array with values assigned to it. // opcao 18 funcao menu_18():caractere var inicio escreval (" A ORDEM INVERSA É: ") para…
-
1
votes1
answer137
viewsQ: Inversion of Array
I want to invert an array, example: void exercicio5() { float array[6] = {10.1, 11.2, 12.3, 127.0, 512.17, -2.5}; float inverso[6]; int cont, x = 6; for (cont = 0; cont < 6; cont++) { x--;…
-
4
votes1
answer9945
viewsQ: How to know if a number is integer
I need to develop an algorithm where, it divides a number by 2, until I get to the rest of the division, and I need to know if the rest of this division is an integer, what method can I apply to…
-
14
votes6
answers6260
viewsQ: How to determine if a number is power 2?
I need to develop an algorithm in Visualg where I enter with a number and it tells me if it’s power of 2 or not. What strategies can I use?
-
1
votes1
answer59790
viewsQ: how to use the POW (POTENCY) function in C
Good afternoon guys, I’ve come this far. #include <stdio.h> #include <math.h> int main(void) { float val_carro, juros_mensal = juros_mensal / 100, num_parcelas, cf; printf("\n\n Digite o…
-
0
votes1
answer321
viewsQ: How to create an array of roulette colors?
#include <stdio.h> int main (void) { char cor[35]; // declarar vetor para receber nome das cores int numeros[35] = {0}; // declarar vetor para receber o numero respectivo das cores int i = 0;…