How do I solve the problem: "Id returned 1 exit status"
#include <stdio.h>
#include<conio.h>
#include<windows.h>
int main()
{
int P, N, NP=0;
printf("Introduzca en nombre del producto:\n");
scanf("%f", &N);
printf("Introduzca en precio del producto:\n");
scanf("%f", &P);
if (P <= 1500)
NP=P*1.11;
else
NP=P*1.08;
printf("El producto %d cuesta %d", NP, N);
getche();
return 0;
}
The full list of errors is:
Permission denied
Id returned 1 exit status
It does not have anything to do with code. Your operating system simply does not allow to modify a file while it is in use, so the compilation (actually, linking, ld
is the linker) fails, because compiler can't remove the old executable and place a new one. To solve this, simply close all existing processes running that program.
If that won't work, check your permissions for directory the executable is in, or look for any programs that are currently using it (some systems allow programs to place a lock on a file, so no other program can modify it).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With