fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. const int SIZE = 20;
  5. struct customer
  6. {
  7. string name;
  8. int num;
  9. string city;
  10. string state;
  11. long zip;
  12. long phone;
  13. string lastPayment;
  14.  
  15. };
  16.  
  17.  
  18. int main() {
  19. customer list[SIZE];
  20.  
  21.  
  22. for(int i = 0; i < SIZE; i++)
  23. {
  24. cin >> list[i].name;
  25. cin >> list[i].num;
  26. cin >> list[i].city;
  27. cin >> list[i].state;
  28. cin >> list[i].zip;
  29. cin >> list[i].phone;
  30. cin >> list[i].lastPayment;
  31. }
  32.  
  33. for(int i = 0; i < SIZE; i++)
  34. {
  35. cout << list[i].name << endl;
  36. cout << list[i].num << endl;
  37. cout << list[i].city << endl;
  38. cout << list[i].zip << endl;
  39. cout << list[i].phone << endl;
  40. cout << list[i].lastPayment << "\n" << endl;
  41. }
  42. return 0;
  43. }
Success #stdin #stdout 0.01s 5284KB
stdin
Mike
11889
Town
CA
92679
10000
11/23/2023
Johny
11
Yucaipa
CA
92399
3066
11/23/2023
stdout
Mike
11889
Town
92679
10000
11/23/2023

Johny
11
Yucaipa
92399
3066
11/23/2023


16

24011439870050307
9887754614250835



23

1898375545116
605590389036



-2030525779

140728140528528
0



65537

140728140527926
3



-2024981984

23452791417376
23452791421536



-2024881714

23452791418656
23452789456892



2

0
1



-2030586848

23452789796189
12721243



4919

0
23452785815600



-2024881009

23452789598968
23452791414784



-2025000968

23452789598968
140728140530016



-2024832582

0
0



0

0
280375465082880



0

0
0



0

0
0



0

0
0



-2025045984

1351001682244828416
0



-2025001752

23452790191760
23452787484577