#include <stdio.h>

int main() 
{
    int x;
    float y;
    printf("Enter the net amount you have purchased:\n");
    scanf("%d",&x);
    if (x>=1000)
    {printf("you got 10% discount \n");
     y=x*0.10;
     printf("\nThe discounted amount is %f\n",y);
     printf("\nThe total amount is %f\n", x - y); }
    else 
    {printf("you got a discount of 5%");
     y=x*0.05;
     printf("\ndiscounted amount is %f",y);
     printf("\nThe total amount is %f", x-y);}
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: