Monday, October 19, 2020

c program of bonus in net salary

First Method:
#include <stdio.h>
int main() {
    float s, b, ns;
    printf("Enter salary:");
    scanf("%f", &s);
    b = s * 0.50;
    ns = s + b;
    printf("Net Salary = %.2f", ns);
    return 0;
}

Second Method:
#include <stdio.h>
int main() {
    float ns;
    printf("Enter salary:");
    scanf("%f", &s);
    ns = ns + (ns * 0.50);
    printf("Net Salary = %.2f", ns);
    return 0;
}

Third Method:
#include <stdio.h>
int main() {
    float ns;
    printf("Enter salary:");
    scanf("%f", &s);
    printf("Net Salary = %.2f", ns * 0.5);
    return 0;
}

No comments:

Post a Comment

2019 wasn’t just a year—it was a whole era.From lectures to late nights, chaos to clarity… every frame built a story I’m still living ✨

Video Link The video contains snaps from 2019 throwback ones when i was doing my masters studies from university of surrey, guildford, londo...