Posts by RafNP • 401 points
13 posts
-
-2
votes2
answers45
viewsQ: Use of cinnamon in macros
Good evening! I want to test a condition that will be implemented in the macro. The value for the test will be informed by the user. My code generates an error when compiling. What can it be? Thank…
-
-5
votes1
answer54
viewsQ: Selection structure, use of the for
I need to select animals older than (60 months), and return their consumption and monthly production, as I tried to idealize in the equations. However, it does not return any number correctly.…
-
4
votes2
answers35
viewsQ: Structures and selection of conditionals
Good afternoon! I’m doing a program that reads various cow data: among them age, production, etc. However, I am in doubt about how I can interrupt the event when typing code =0. As it is in the…
-
1
votes1
answer119
viewsQ: Pointer use
I need to use pointers, but I’m not sure how to express the syntax, it’s part of the goal of the task (change the value of the parameters passed by reference to the functions, such that these…
-
1
votes2
answers74
viewsQ: Using functions
Good afternoon! I am implementing a game of stone, paper and scissors, where occurs the application of functions, with and without argument and return. I was in doubt, after the program identify the…
-
2
votes1
answer38
viewsQ: How to have an option that exits the program or continues running with others?
You can add a third option when asking the user, and this option will only appear after the first calculation. Ex. (3 quit). I just thought of the way the 3 options emerge from the beginning.…
-
2
votes2
answers3240
viewsQ: How to take information from one function and use it in another?
I need a program that performs sum and multiplication according to the user’s choice and later select the corresponding function that will read the values, until the user enters 0 and the program…
-
5
votes2
answers540
viewsQ: How do I exit a loop by typing a specific value?
I need to make a program that multiplies the numbers informed by the user, and when it reports 0 (zero), the program shows the multiplication of the numbers typed. However, I am in doubt of how I…
-
0
votes2
answers594
viewsQ: Application of Bubble Sort
I am making a program, which prints at the end the numbers typed by the user in ascending order using Bubble Sort. It wanted a help to implement this function. My code: #include <stdio.h>…
-
-3
votes1
answer1148
viewsQ: How to select positions of the matrix/ random draw?
Good morning! I need to do a random draw of the elements of the matrix to know if there is a boat (boat=1). As well as, at the end of 10 attempts need to print with (x) the successfully bombed…
-
3
votes2
answers128
viewsQ: Use of conditions in matrices
I need to do a program that reads a 4X4 matrix and then sums the values in each row and then for each column. I’m not sure how to define my condition. #include <stdio.h> int main() { int…
-
7
votes4
answers658
viewsQ: How to test the condition on a vector?
I have to make a program that reads a text, where each first letter of each word in the text is replaced by a character (*). I cannot compile correctly, I believe the problem is in my condition…
-
3
votes2
answers107
viewsQ: How to fix multiple errors in this code?
I’m making a code that needs to contain 3 vectors (number one. enrollment, grade 1 and grade 2), relative to 6 students, which needs to be included: the final grade of each student; class average; o…