Saturday, October 24, 2020

If the purchase amount is more than 2000 Rs, the discount is of 20%

#include <stdio.h>

int main() {

    float pa;

    printf("Enter Purchase Amount:");

    scanf("%f",&pa);

    if(pa>=2000)

    {

        pa = pa - (pa*0.2);

    }

    printf("Net Payable=%.2f",pa);

}

No comments:

Post a Comment

Can’t Read Books? Try This 5-Minute Habit Instead (It Actually Works)

Can’t Read Books? Try This 5-Minute Habit Instead (It Actually Works)   Hi, namaste Krishna. So, um today I'll be sharing a very good ha...