Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main() {
- ifstream store;
- char Product[] = {0};
- int price;
- store.open("C:\\Users\\BOGOMIL\\Documents\\Visual Studio 2015\\Projects\\ConsoleApplication6\\store.txt" );
- if (store.fail()) {
- cout << "Failed to open file"<< endl;
- return -1;
- }
- while (!store.eof()) {
- store.get(Product, 10, '$');
- ofstream Prices;
- Prices.open(Prices);
- int LowRange = 0;
- int Midrange = 0;
- int HighRange = 0;
- if (price == 10 || price < 10 && price > 0) {
- Prices << "Products in the 0-10 range" << LowRange++;
- }
- else if (price == 20 || price < 20 && price > 10) {
- }
- else if (price > 20) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement