-
March 12th, 2012, 03:27 PM
#1
Arrays
Hello
Have a simple question. I'm new to programming so bear with me. I want to create an array that is equal to the sum of two ints.
example
int smoking = 9;
int nonSmoking = 5;
int rooms[];
I want my array to equal the sum of those two variables. But yes I could just declare it 14. I'm asking my user for the number of available rooms storing it in the smoking or nonsmoking variable. Once the input is received I want those two variables to be the length of my array.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|