I've been stuck on my assignment and I have a general question (don't want my hw answered for me). If I have lines of input such as:
14 14 14 14 14 45 45
18 14 60 10 10 24 12
and I want to compare each row(take difference of each number; 15-14, etc.) with another line of input such as:
15 15 15 15 20 20 50
I don't wanna post my code because I'm not looking for someone to do the work for me. What I'm trying right now is to make an Array
and use a for loop
but I'm not sure how to store each value(separate by space), and I'm not sure how to store 5 rows into an Array
.
I'm not allowed to use vectors. I'm only allowed to use iostream, sstream, and string. If anyone can provide a quick answer/hint as to how I would do this that would be great. Thank you