OK here's what I have so far. I have it accepting input from the user. But i"m getting lost when it comes to accessing the arrays.
#include <cstdlib>
#include <iostream>
using namespace...
Type: Posts; User: gec5741
OK here's what I have so far. I have it accepting input from the user. But i"m getting lost when it comes to accessing the arrays.
#include <cstdlib>
#include <iostream>
using namespace...
so I'm thinking program would ask user to enter in how many cities they want to view. User inputs a number. Then run a loop that has them enter in a temp the number of times they entered in for...
Tank you very much.
Another thing I don't understand is the user will enter in the number of day's they want to view. that would populate the size of one array but what about the array for the...
I need to to the following and I'm still pretty new to coding. Our teacher has asked us to... Formulate a C++ program solution that does the following. It holds in 2 parallel arrays, the values for...
Great thanks! I see what your saying and what I did wrong. Makes sense. What took me a while to figure out is I was trying to initialize counter = 0 by typing "int counter = 0;
guess I didn't...
When I get to the do while loop it just asks for the temp one time and it looks like it's just taking the on entry and subtracting 1?
#include <cstdlib>
#include <iostream>
using...
I'm getting there. I have the while loop working now. But my do while loop won't bump the appriate amount of times. I'll get it.
Thank you,
I think i'm starting to see. Weird thing is the while loop dosent' seem to want to put the avreage in a decimal if needed. it's averageing a temp of 2 and 3 as average = 3. Where the...
Do you mean when I declared my variables? I'm a bit unclear when I should initialize them to a value and when I shouldn't.
Now I have to figure out how to do the same loop in a while and do while loop.
Here is the code I added for my while loop but it's not doing the average for the while loop. adding the temps...
Perfect! Thank you.
I just changed a couple variables to double to accomadate for decimal and were in buisness. I thought I tried somethig similar but I'm sure I had something wrong. I am only...
That makes sense. But I have to kinda stay on what we have learned so far. And this is only my 3rd lab in this class. We havn't covered vectors. Is there a more basic way to accomplish this? I...
Noob needs help.
I have a situation where I'm asked to ask the user to enter in the number of cities to calculate an average temperature for and then use each of the 3 basic loop structures.
...
Im unlcear on what the rules for indentations are really?
Is this any better?
#include <cstdlib>
#include <iostream>
using namespace std;
Thank you for your suggestions. I am as I said a begginer so what you suggest may be a bit advanced for this project. It's my second lab in this class ;)
I will look into using a switch...
Thank you for your response.
I'm having a hard time wraping my head around how to tell it to say "invalid input" for anything other then a number.
OK I just started my very first C++ class and I am working on a lab. Here is the code I wrote and a break down of what I'm trying to do.
My code is doing what I want it to do. However what I am...