#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
float bonus_a_receber(float salario, float perc){
float a_pagar;
a_pagar = (salario * perc) / 100;
return a_pagar;
}
int main(int argc, const char * argv[]){
setlocate(LC_ALL, "portuguese");
float sal, per, total;
printf("Digite o seu salário: ");
scanf("%f", $sal);
printf("Digite o percentual do bonus: ")
scanf("%f", per);
total = bonus_a_receber(sal, per);
printf("Bonus a receber R$ %.2f\n", total);
return 0;
}
Output
Digite o seu salário: Program ended with exit code: 01000
Digite o percentual do bonus: 10
Bonus a receber R$ 100.00
Does anyone know how to tell me why compiling in Xcode this code in C does it display the message below? PS In other compilers the message is not displayed ...
Program ended with exit code: 01000
Thank you!