Someone can help me in the logic of this code? the beginning of it I understand but I get a bit cluttered in the part of the, can someone help me to understand?
#include <stdio.h>
int main(){
int fatorial, n;
printf("insira o numero qu...
I'm implementing a tree in C, and one of my methods prints my tree in preorder, and separating the numbers with - .
I created this function:
void ImprimePreOrdem(TipoApontador arv){
if(arv!=NULL){
printf("%d-",arv->chav...
Well, I'm doing a basic code in C, I'm not very good with this language, I'm learning it, although I've already seen it not used much. It consists of doing the power operation through recursion.
The problem is in the output when the power is gre...
The program must read a number and compare with the numbers of a 3x3 matrix any if the number belongs to a column of the matrix it should print the position, when I type 1 it prints two positions, but the 1 is only in one position .
#include &l...
I was doing a simple "C" calculator just to exercise logic, which I learned and for fun, but I had problems, since I would like to transform it and a scientific calculator, I would need more memory than the Float can use, so I tried to u...
I have an interesting problem in my code, the program reads three numbers and says whether it is a triangle rectangle or not, but the problem is that depending on the sequence I type the numbers, program the error because the higher value typed...
I'm having difficulty displaying some printf , for example:
printf("\nDigite as horas : %d");
And at the time of displaying the message, it appears with a side number, for example:
Enter the hours: 89676
What's wrong with th...
A Falha de segmentação error is occurring when trying to access information from a struct. The code is as follows
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int val;
}Info;
void inserir(Info*);
void main(){...
I get the elements of a list but at the time of saving it does not save with line break saves everything on the same line.
fprintf(arquivo, "%s\n", p->infoLinha);
I created a calculator in C, with menu and everything else, with switch case when choosing a function between + , - , * , / , etc. You enter two values and they are executed according to the function. How to do aft...