1
Hello, I’m new to the C language and I’d like to know how to fix this code. When executing the code below, I get the following error message in row 22 and column 13:
[Error] invalid Conversion from 'int' to 'const char*' [-fpermissive]
Code:
include <stdio.h>
int main(void){
int resul;
int a;
int b;
printf("Digite o valor de A: ");
scanf("%d", &a);
printf("Digite o valor de B: ");
scanf("%d", &b);
resul = b;
b = a;
a = resul;
printf(a);
printf(b);
return 0;
}
The print function requires you to enter a format string. Of type:
printf("a: %d\n", a);
.– anonimo
What is expected as output?
– Brewerton Santos