Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include<stdio.h>
  2. #include <iostream>
  3. int main()
  4. {
  5. char name[50];
  6. float sallery;
  7. float EPF;
  8. float tax;
  9. float net;
  10.  
  11.  
  12. cout << "Enter student name : ";
  13. cin >> name;
  14. cout << "Enter the sallery : ";
  15. cin >> sallery;
  16.  
  17. if(sallery <= 3000)
  18. {
  19. EPF = sallery * 0;
  20. tax = sallery * 0.03;
  21. }
  22. else if(sallery > 3000)
  23. {
  24. EPF = sallery * 0.04;
  25. tax = sallery * 0.05;
  26. }
  27.  
  28. net = sallery - EPF - tax;
  29.  
  30. cout << "name : %s \t EPF = %.2f \t tax = %.2f total sallery = %.2f " << name << EPF << tax << net;
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement