Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<fstream>
- #include<windows.h>
- using namespace std;
- int main(void)
- {
- int parameters_num = 2;
- string s;
- string arr[3][3] = {
- {"022572", "Пр1", "25"},
- {"580216", "Пр2", "35"},
- {"003984", "Пр3", "45"}
- };
- fstream f;
- f.open("help.txt");
- for (int y = 0; y <= 2; y++) {
- for (int x = 0; x <= parameters_num; x++) {
- SetConsoleOutputCP(1251);
- switch (x)
- {
- case(0):
- {
- cout << "Штрих код - ";
- break;
- }
- case(1):
- {
- cout << "Имя - ";
- break;
- }
- case(2):
- {
- cout << "Цена - ";
- break;
- }
- }
- cout << arr[y][x];
- if (x != 2) {
- cout << ", ";
- }
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment