//A book store gives 10% discount to a buyer if the buyer buys books more than Rs 1000.Write a //program to asking the cost of books and calculate discount amount.

#include<stdio.h>

#include<conio.h>

void main()

{

float total_books_amount_bought;

float discount_amount;

printf("enter total books' amount purchased\n");

scanf("%f",&total_books_amount_bought);

if(total_books_amount_bought<1000)

{

printf("sorry, no discount we have for this much amount!\n")

#include<stdio.h>

#include<conio.h>

void main()

{

float total_books_amount_bought;

float discount_amount;

printf("enter total books' amount purchased\n");

scanf("%f",&total_books_amount_bought);

if(total_books_amount_bought<1000)

{

printf("sorry, no discount we have for this much amount!\n")

}

else(total_books_amount_bought>1000)

{

discount_amount=total_books_amount_bought-total_books_amount_bought*0.1;

else(total_books_amount_bought>1000)

{

discount_amount=total_books_amount_bought-total_books_amount_bought*0.1;

printf("the discount amount=%f\n",discount_amount);

}

printf("thank you!!!!\n");

getch();

}

}

printf("thank you!!!!\n");

getch();

}

## No comments:

## Post a Comment