Aim:-Write Program For Find Discount in Programming c

Input:-

#include<stdio.h>

int main()

{

    int amount,product,discount;

    

    printf(“enter amounnt=”);

    scanf(“%d”,&amount);

    printf(“enter product”);

    scanf(“%d”,&product);

    

    if (amount>=5000 && product>=5)

    {

        discount=amount/20;

        printf(“discount=%d”,discount);

    }

    else

    {

        printf(“you not get discount”);

    }

    return 0;

}

Output:-

enter amounnt=7000

enter product=6

discount=350

Advertisements