I am attempting to complete a homework assignment. The progam basically requires input from the keyboard into an array and then to perform some calculations on the input information. I believe I can do the calculations, but I cannot figure out how to get the input into the array. The assignment requires a two-dimensional array. My book, all examples from the instructor, everything on the internet ( I have tried everything I know) initializes the array with static values. I cannot figure out how to make the input data go into the array to be manipulated. Please provide me with a direction to go I am stumped. I have attached what I have so far.
talk2tisa 13 Newbie Poster
Recommended Answers
Jump to PostIt's fairly simple use a separate for loop for both input and output:-
i.e
#include <iostream> #include <iomanip> #include <cstdlib> using namespace std; const int rowSize = 2; const int colSize = 12; int main() { int temps [rowSize][colSize]; int temp1; int temp2; int rows; int …
All 4 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.