#include <stdio.h>
#include <stdlib.h>
int main()
{
int num1, num2, num3;
printf("Digite o numero A e numero B para saber o resto da divisao resultante da divisao entre eles:\n");
printf("NumeroA: "); scanf("%i\n", num1);
printf("\n");
printf("NumeroB: "); scanf("%i\n", num2);
printf("O resto da divisao e: %i", num1 % num2);
return 0;
}
Instead of printing the rest, OS prints the first, second printf()
and scanf()
.
What am I doing wrong?
I would also like to know how I can indicate a variable in a printf()
(as I know Python will try to explain and if anyone knows I think I can understand)
n = int(input("Digite um numero: "))
m = int(input("Digite outro numero: "))
print (" Imprimiu o numero {} e {}".format(n, m))
I'm new to this and I'm only 15 years old. D, use accessible language please.