Posts by Wesley Franklin • 3 points
2 posts
-
-1
votes1
answer59
viewsQ: I wonder why my code doesn’t work, I believe my logic is correct, but it’s picking up garbage
I will receive 5 values in the vector, I have to add the largest of them to the smallest of them, What’s wrong with it? follows my code. #include <stdio.h> int main(){ int vetor[5]; int i = 0;…
-
-1
votes1
answer54
viewsQ: Doubt in the use of the for
I need to make a code to solve the following question: I have a basket with capacity C, I have 3 types of fruit, I will receive the amount one per line, to put all of them in the basket, the…