Monday, October 26, 2020

if grade is A then salary is double otherwise 50% bonus

 #include <stdio.h>

int main() 

{

    float s;

    char g;

    printf("Enter salary & grade:");

    scanf("%f %c",&s,&g);

    if(g=='A')

    {

        s=s*2;

    }

    else

    {

        s=s*1.5;

    }

    printf("Net Salary=%.2f",s);

}

No comments:

Post a Comment

Why Being "Too Sensitive" Is Actually a Superpower 🤍

  https://www.youtube.com/watch?v=uiHbx9HgmwI Hi, Namaste, Kemcho? So, I just wanted to share one thing I think, yeah. So, it's like I r...