//
// main.cpp
// Final
// Created by Shea Oswald on 5/13/15.
// Copyright (c) 2015 Shea Oswald. All rights reserved.
//
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
int main(){
ifstream fin;
ifstream fout;
int highs [12][31];
int lows[12][31];
bool running = true;
int choice;
string line;
string input;
do{
ifstream fin ("Low.txt");
if (fin.is_open()){
for(int i = 0; i < 12; i++){
for(int x = 0; x <31; x++){
fin >> lows[i][x]; //writing with character of array in the file
}
}
cout << "Array data successfully saved into the file test.txt" << endl;
fin.close();
}
else cout << "Unable to open file" <<endl;
ifstream fin1 ("High.txt");
if (fin1.is_open())
{
for(int z = 0; z < 12; z++)
for(int v = 0; v < 31; v++)
{
fin >> highs[z][v]; //writing ith character of array in the file
}
cout << "Array data successfully saved into the file test.txt" << endl;
fin1.close();
}
else cout << "Unable to open file";
cout << "Choose and option from the menu below to display. " <<endl;
cout << "1). Display the highs for the year." <<endl;
cout << "3). Display the lows for the year." <<endl;
cout << "3). Display the single high temp for the year." <<endl;
cout << "4). Display the single low temp for the year." <<endl;
cout << "5). Display a chart with the high and low for each month." << endl;
cout << "6). Display a chart with the average high and low temps for each month." <<endl;
cout << "7). Display the average high and low temps for the whole year." << endl;
cout << "8). Find how many times the hogh temp was above a a give amount." <<endl;
cout << "9). Find how many times the low temp was below a given amount." <<endl;
cout << "10). Exit." <<endl;
cin >> choice;
First of all, "lol" at the copyright.
Secondly; use the <> format brackets so the code is formatted properly.
Thirdly, what do you mean by "block formation"?