Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4. using namespace std;
  5. int main() {
  6. ifstream store;
  7. char Product[] = {0};
  8. int price;
  9. store.open("C:\\Users\\BOGOMIL\\Documents\\Visual Studio 2015\\Projects\\ConsoleApplication6\\store.txt" );
  10. if (store.fail()) {
  11. cout << "Failed to open file"<< endl;
  12. return -1;
  13. }
  14. while (!store.eof()) {
  15. store.get(Product, 10, '$');
  16. ofstream Prices;
  17. Prices.open(Prices);
  18. int LowRange = 0;
  19. int Midrange = 0;
  20. int HighRange = 0;
  21. if (price == 10 || price < 10 && price > 0) {
  22.  
  23. Prices << "Products in the 0-10 range" << LowRange++;
  24. }
  25.  
  26. else if (price == 20 || price < 20 && price > 10) {
  27.  
  28. }
  29.  
  30. else if (price > 20) {
  31.  
  32. }
  33.  
  34.  
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement