No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
An amateur meteorologist wants to keep track of weather conditions during the past year's three month summer season and has designated each day as either rainy(R), cloudy (C) or sunny (S). Write a program that stores this information in a 3x30 array of characters, where the row indicates the month …
#include <iostream> #include <fstream> using namespace std; int main() { const int NUM_MONTHS = 3; const int NUM_DAYS = 30; const int NUM_TYPES= 3; char forecast[NUM_MONTHS][NUM_DAYS]; int counts [NUM_MONTHS][NUM_TYPES]; int rainyDays = 0; ifstream datafile; datafile.open("RainOrShine.txt"); if (!datafile) cout << "Error opening data file.\n"; else { // Read data and …
The End.
de-de