-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprac54.c
33 lines (33 loc) · 910 Bytes
/
prac54.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//This program is performed by DARSH_22CS051
#include<stdio.h>
void main()
{
int stock,order;
char credit;//character declaration
//user input
printf("Enter the value of stocks:");
scanf("%d",&stock);
printf("Enter the value of credit:");
scanf("%s",&credit);
printf("Enter the value of order:");
scanf("%d",&order);
//condition for suply requirements and refund
if(order<=stock && (credit=='y' || credit=='Y'))
{
printf("supplied customor's requirment\n\tQuentity:%d",order);
}
else if(order>stock && (credit=='y' || credit=='Y'))
{
printf("out of stock.Supplied %d products \n",stock);
printf("your balance will be refunded");
}
else if(credit=='n' || credit=='N')
{
printf("Your credit is not OK");
}
else
{
printf("please enter the proper details!!");
}
printf("\nThis program is performed by DARSH_22CS051");
}