Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(int argc, char *argv[]){
- const int COLUMN_WIDTH = 10; // Ширина колонки в сиволах
- const int N = 6;
- float val[N]; //Выделяем массив под N чисел
- //Считываем числа с клавиатуры
- for(int i = 0; i < N; i++){
- cin >> val[i];
- system("cls"); //очищаем экран
- }
- cout.fill(' ');
- cout.width(COLUMN_WIDTH * 2);
- cout << "";
- cout << "|";
- cout.width(COLUMN_WIDTH);
- cout.fill('=');
- cout << "|";
- cout.width(COLUMN_WIDTH);
- cout << "|" << endl;
- cout.fill(' ');
- for(int i = 0; i < N/2; i++){
- cout.fill(' ');
- cout.width(COLUMN_WIDTH * 2);
- cout << "";
- cout.setf(ios::left);
- cout << "|";
- cout.width(COLUMN_WIDTH - 1);
- cout << val[i] << "|";
- cout.unsetf(ios::left);
- cout.width(COLUMN_WIDTH - 1);
- cout << val[i+N/2];
- cout << "|" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement