You are on page 1of 2

Code:

#include < stdio.h >

int main()
{
int qty, dis;
float rate, total;

printf("Enter rate and quantity\n");


scanf("%f %d", &rate, &qty);

if(qty > 999)


{
dis = (qty * rate) * 10 / 100;
}
else
{
dis = 0;
}

total = (rate * qty) - dis;

printf("Total Paid is Rs %f\n", total);

return 0;
}
Flowchart:

Pseudo code:
output(“Input value if more than 1000”)
 input (number)
 Begin:
 if number >999
 then
 output(“print value after discount offer”)
 endif
 if number <1000
 then
 output(“print actual value only ”)
 endif
 end

You might also like