I am learning C Programming...
Now that I am in the process of writing programs, I have a doubt which I am not able to clear yet.
I tried searching the internet for that stuff without any luck.
I am posting a very simple program here.
The Program works absolutely fine. The only thing is that it picks up some gibberish.
My question is...is there any hard and fast rule to avoid getting this gibberish? If yes, what is it?
Here's the Program:
/*Lara's basic salary is input through the keyboard.
Her dearness allowance is 35% of basic salary, and house rent allowance is
25% of basic salary. Write a program to calculate his gross salary. */
printf("Enter your Basic Salary:%d");
gross = basic+(0.35*basic)+(0.25*basic);
printf("Your Gross Salary is: %f",gross);