Question:
Programming Problem with C?
Anonymes
2015-01-07 05:45:11 UTC
Hey there! I was solving some questions from my book and on one of the answers I did it says (ld returned 1 exit status)
this is the program can u look at it and tell me where is the problem.


#include

int main()
{
float sales,salery;

while (sales != -1){
printf("Enter sales in dollars");
scanf("%g", &sales);

salery = 200 + (0.09*sales);

printf("His New Salery is : %g\n", salery);

}
return 0;
}
Three answers:
Praveen
2015-01-07 06:08:13 UTC
First of all you should give a value to variable sales like 0. Then only you can use it in while loop without any bugs.
?
2015-01-07 06:31:52 UTC
no problem except initialize variable
Leaf King
2015-01-07 06:34:30 UTC
damn..im dumb. how u learn this stuff?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...