Posts by Gabriel Vinicius • 339 points
21 posts
-
0
votes1
answer34
viewsQ: How do I enter with several different files
Good evening, I have a question, I have a program that will receive several files of the type nome.txt, and I must count how many characters are inside the file, I tried to make a prototype but…
casked Gabriel Vinicius 339 -
1
votes1
answer74
viewsQ: Why, within the function, is the program not comparing correctly?
The program receives the number of questions, the number of students, creates a vector of type char for the feedback and compares with the result of the other students, in a matrix, but within the…
casked Gabriel Vinicius 339 -
0
votes1
answer35
viewsQ: Problem with the final results
Good evening, my code is giving a problem that I can not find, his idea is the following: I add the number of questions and the number of students in the class, and then add a feedback and the…
casked Gabriel Vinicius 339 -
-1
votes2
answers390
viewsQ: Use of EOF in vectors
Good evening, I wonder if in this program I am using the EOF(end of file) right, IE, while I do not type 0, the vector will be allocated and recorded with a value?? Follows code below: #include…
casked Gabriel Vinicius 339 -
0
votes2
answers1482
viewsQ: How can I complete the harmonic mean?
I wonder why my code is not returning the correct values, because when I type the value it does not calculate correctly, how to enter with two notes, both valid 5.0 and 5.0, the exit should be 5.0…
-
1
votes1
answer101
viewsQ: How can I add the result value to the previous value?
I’d like to know, res the value of the sequence and then print it? as for example, enter the value of N equal to 2 and achieve output value 2.5? #include <stdio.h> int main (void) { int N,i;…
casked Gabriel Vinicius 339 -
4
votes5
answers294
viewsQ: Problem with calculator program
Good morning, I would like to know, why is my calculator program not printing the value of operations?? Below is the code: #include <stdio.h> int main (void) { float A, B; char op; scanf("%f",…
casked Gabriel Vinicius 339 -
1
votes1
answer51
viewsQ: Reading a sequence between 2 and a given value of x
Good afternoon, I would like to know, how can I create a vector that stores a sequence, that is, if I want the numbers between 2 and x and the user between x = 10, the values within the vector are…
casked Gabriel Vinicius 339 -
2
votes1
answer84
viewsQ: Storing a character array within a heap memory
I would like to know how to order a set of characters in a vector, and store them in memory heap.
-
1
votes1
answer197
viewsQ: Why doesn’t my code print?
I wonder why this code I’m creating doesn’t print anything when I compile it: #include <stdio.h> #include <stdlib.h> #include <time.h> int main (void) { int dadoacerto, vidadrizzt,…
casked Gabriel Vinicius 339 -
0
votes1
answer495
viewsQ: Difficulty with triangular number program
I’m having trouble creating a program that prints whether the number typed is triangular or not. How should I proceed to create within the conditional an undefined sequence for a large number?…
casked Gabriel Vinicius 339 -
0
votes2
answers4930
viewsQ: Triangular number
I wonder, why when I type in the program below that checks if the typed number is triangular, ie, is multiple of three consecutive numbers, as example 60 it prints two "NO" and a "YES", and when…
casked Gabriel Vinicius 339 -
1
votes2
answers132
viewsQ: Problem with second degree equation program
I have an interesting problem in my code, the program reads three numbers and says whether it’s a rectangle triangle or not, but the problem is that depending on the sequence I type in the numbers,…
casked Gabriel Vinicius 339 -
5
votes2
answers2880
viewsQ: How can I print only the fractional part of the number
Good evening, I would like to know how I can print the fractional part of the real number, that is, when I type 5.678, I would like to print in the second A(where this comment), only the number…
casked Gabriel Vinicius 339 -
0
votes2
answers52
viewsQ: Why is one of the cases incorrect?
Good evening, I wonder, why my code return a wrong value for a case in which the input is 1.1 and 100000, the output should give 100000 and 5000050000 and this giving 100000 and 705082704?? the…
casked Gabriel Vinicius 339 -
3
votes3
answers211
viewsQ: Program using malloc twice
Why this program that divides a number into decimal notation, transforms it into binary notation and prints the number on the screen in the correct sequence (from bit most significant for the least…
-
1
votes2
answers87
viewsQ: Problem with vector ordering
Good afternoon, I’m having a problem with a vector ordering exercise, I’ve reviewed the code, it compiles, but I’m not finding the error so the order does not get crescent, varying in certain parts.…
-
1
votes2
answers155
viewsQ: Undefined Ference to MIN
When compiling my media program with discard, the following error occurs. Remembering that I used the MIN to rule out the lowest value between a, b, c and d. My program. c:(.text+0x8b): Undefined…
-
4
votes2
answers1045
viewsQ: Calculation to determine whether triangle is rectangle gives no expected result
The program I created takes three integer values, calculates within the if these values and if the condition is correct it should show on the screen the YES (the triangle is rectangle), and if the…
-
5
votes3
answers185
viewsQ: Problem with program that prints three numbers increasingly
I’m having trouble creating the decision structures in a program that reads three numbers and prints them increasingly. My code that’s going wrong is this:: #include <stdio.h> int main (void)…
-
1
votes1
answer231
viewsQ: Problem with delta output<0
Good evening, I am having trouble with the output of my program which printed on the screen the roots of the second degree equation. When I go to the condition of: if (delta<0) //Condicao caso o…
casked Gabriel Vinicius 339