1
Algorithm "takes age":
// idade deve sempre ser positiva, por isso vou usar unsigned
unsigned int t1;
printf("Digite sua idade:");
scanf("%d", &t1);
printf("Idade: %d", t1);
Doubt: Even if I enter with a negative value, 2 printf()
is negative. I did not understand the actual use of the modifier unsigned
of int
?
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote for any question).
– Maniero