Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for salary problem #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions algorithms/salary-problem/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include <stdio.h>

int main(){

int base_salary;

printf("Enter the base salary : \n");

scanf("%d",&base_salary);

int work_days;

printf("Enter the Numbers of working days : \n");

scanf("%d",&work_days);

if(work_days <= 25)
printf("Salary : %d",base_salary);

else if (work_days <= 0)
printf(0);

else if(work_days > 31)
printf("Salary : %d",base_salary + 6000 );


else
printf("Salary : %d",base_salary + 1000*(work_days-25));


return 0;


}
Binary file added algorithms/salary-problem/main.exe
Binary file not shown.