-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy pathCustoemerSell.cpp
62 lines (56 loc) · 1.79 KB
/
CustoemerSell.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <iostream>
#include <conio.h>
using namespace std;
struct daraz_customer{
string name;
string email;
int id ;
int age;
string item;
int quantity;
float price;
float dis;
string time;
};
int main(){
int num;
daraz_customer customer;
cout<<"Enter the number of customers for storing their data ";
cin>>num;
int arry [num];
for(int i=0; i<num; i++){
cout<<"Enter the name of customer "<<""<<i+1<<" ";
cin.ignore();
getline(cin,customer.name);
cout<<"Enter the Email of customer ";
cin>>customer.email;
cout<<"Enter the id of customer ";
cin>>customer.id;
cout<<"Enter the age of customer ";
cin>>customer.age;
cout<<"Enter the item bought by the customer ";
cin.ignore();
getline(cin,customer.item);
cout<<"Enter the quantity of items bought by the customer ";
cin>>customer.quantity;
cout<<"Enter the total price of customer ";
cin>>customer.price;
cout<<"Enter the discount given to customer ";
cin>>customer.discount;
cout<<"Enter the date and time of purchase ";
cin.ignore();
getline(cin,customer.time);
cout<<"\n";
cout<<"Name of Customer "<<i+1<<" " <<customer.name<<endl;
cout<<"Email of Customer "<<customer.email<<endl;
cout<<"ID of Customer "<<customer.id<<endl;
cout<<"Age of Customer "<<customer.age<<endl;
cout<<"Item bought by the customer "<<customer.item<<endl;
cout<<"Quantity of items bought "<<customer.quantity<<endl;
cout<<"Total price of Items "<<customer.price<<endl;
cout<<"Discount given to customer "<<customer.discount<<endl;
cout<<"Price to pay after discount "<<customer.price-customer.discount<<endl;
cout<<"The time of purchasing item is "<<customer.time<<endl;
cout<<"\n";
}
return 0;}