Problem 24: Salary Scale

You are given the rank and salary scale of a company-

Rank – salary
1 – 2,50,000 BDT
2 – 2,10,000 BDT
3 – 1,50,000 BDT
4 – 80,000 BDT
>=5 – 50,000 BDT

Now, take the rank as input from the user and print the salary of the given rank. [If user gives input ‘3’ you should print ‘Your Salary: 1,50,000 BDT’]

 

2,105 total views, 2 views today

Comments

comments

3 thoughts on “Problem 24: Salary Scale”

  1. #include
    int main()
    {
    int i;
    printf(“Enter Your Rank\n”);
    scanf(“%d”,&i);
    if(i==1)
    printf(“Your salary is 2,50,000 BDT\n”);
    else if(i==2)
    printf(“Your salary is 2,10,000 BDT\n”);
    else if(i==3)
    printf(“Your salary is 1,50,000 BDT\n”);
    else if(i==4)
    printf(“Your salary is 80,000 BDT\n”);
    else if(i==5)
    printf(“Your salary is 50,0000 BDT\n”);
    else
    printf(“out of rank\n”);
    return 0;
    }

  2. #include
    int main()
    {
    int n;
    printf(“Enter your rank \n”);
    scanf(“%d”,&n);
    if(n==1){
    printf(“Your salary is- 2,50,000 BDT\n”);
    }
    else if(n==2){
    printf(“Your salary is- 2,10,000 BDT”);
    }
    else if(n==3){
    printf(“Your salary is -1,50,000 BDT”);
    }

    else if(n==4){
    printf(“Your salary is -80,000 BDT”);
    }
    else{
    printf(“Your salary is -50,000 BDT”);
    }

    }

  3. #include
    int main()
    {
    int x;
    scanf(“%d”,&x);
    if(x==1){
    printf(“your salary is 2,50,000 BDT”);
    }else if(x==2){
    printf(“your salary is 2,10,000 BDT”);
    }else if(x==3){
    printf(“your salary is 1,50,000 BDT”);
    }else if(x==4){
    printf(“your salary is 80,000 BDT”);
    }else{
    printf(“your salary is 50,000 BDT”);
    }
    return 0;
    }

Leave a Reply

Your email address will not be published.