Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int n;
  6. float basic;
  7. float bonus;
  8.  
  9. for(;;)
  10. {
  11. printf("Enter the Emp No = ");
  12. scanf("%d",&n);
  13.  
  14. if(n==999)
  15. {
  16. break;
  17. }
  18. else
  19. {
  20. printf("Enter Employee Salaryn");
  21. scanf("%f",&basic);
  22. printf("Basic Salary is %f",basic);
  23.  
  24. if(basic < 100000)
  25. {
  26. printf("Debug 1");
  27. bonus = 0.75 * basic;
  28. }
  29. else
  30. {
  31. printf("Debug 2");
  32. bonus = 0.5 * basic;
  33. }
  34. printf("Employee %s Bonus is %.2f",n,bonus);
  35. }
  36.  
  37. basic = 0.0f;
  38. bonus = 0.0f;
  39. }
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement