Posts by Leandro Souza • 113 points
7 posts
-
0
votes0
answers87
viewsQ: Doubt - Map operation in C++
In order to compare different pairs of shoes I created a map, the first int represents size and the char represents whether it is for the left or right foot ('e' or’d'). N represents the number of…
-
0
votes0
answers21
viewsQ: Code does not execute a second " var = getchar(); " if an if is true
Why the code below does not allow me to fill in the 'ext' variable if the established condition has been accepted? #include <stdio.h> #include <stdlib.h> void main(){ char ext; char dif;…
-
-1
votes1
answer180
viewsQ: Rand() returning the same value even with the inclusion of srand((unsigned)time(NULL)
Why the function scrolled below always returns the same values when called multiple times, although Seed srand((unsigned)time(NULL)) has been initialized? #include <time.h> #include…
-
5
votes3
answers97
viewsQ: Why does the first element of the vector come out as zero without having stored this value there?
Why the following code prints a 0 at the beginning of the output? #include <stdio.h> #include <limits.h> // Escreva um programa que leia do teclado 8 valores, e em seguida os // imprima…
-
2
votes2
answers103
viewsQ: Unexpected result
I wish to carry out the division of two integers and have as a result a floating point value. The following code works normally: #include <stdio.h> float divInts(int x, int y) {…
-
1
votes1
answer605
viewsQ: "Printf not declared in this Scope" even with the use of #include <stdio. h>
Why am I getting the error message : [Error] 'prinft' was not declared in this scope related to line 22 of the code below, if the first thing I did was declare: #include <stdio.h>. I am using…
-
2
votes2
answers62
viewsQ: C - Remove result element
How do I remove the 0.00000 printings in the response of that program after the functions idealBrutus and idealOlivia are called in the function main? I realized that if, for example, I change line…
casked Leandro Souza 113