Forum: C++ Dec 13th, 2007 |
| Replies: 10 Views: 1,589 In my program I am using the do-while loop to go through program..
my question is how do I loop the program without the do-while loop...
rather that when the user enters menu number 0, it quits... |
Forum: C++ Dec 12th, 2007 |
| Replies: 3 Views: 409 Is there a function in C++ where a string can be held in a Unsigned array? |
Forum: C++ Dec 12th, 2007 |
| Replies: 3 Views: 409 Ok, I am setting all elements in the array to 0...
If all elements are 0, i want it to display "No inventory"
if there is something in the element, i want to display only its contents..
Heres... |
Forum: C++ Dec 6th, 2007 |
| Replies: 1 Views: 1,007 In the retailitem.cpp I need to beable to increment x,y and z. So that is displays the next item. Heres what the code should output
Descriptio Units On Hand Unit Price ($)
Item #1 Jacket ... |
Forum: C++ Nov 22nd, 2007 |
| Replies: 7 Views: 1,926 Ok, so this is what i have... sorry for the ignorance, but i am slowly getting it..
if i typed "prime 45 70"
the program rightly displays primes between 45 and 70..
if I type "prime" the... |
Forum: C++ Nov 22nd, 2007 |
| Replies: 7 Views: 1,926 OK, I finally figured out command line arguments... my program is called prime, in the console i need to type "prime 7" and the program will tell me if its a prime or not.
heres my code:
#include... |
Forum: C++ Nov 22nd, 2007 |
| Replies: 2 Views: 1,840 What exactly does this mean??
Your program must determine the user-specified lower bound and upper bound by using command-line arguments. You will need to use the strtoul() function (from the... |
Forum: C++ Nov 20th, 2007 |
| Replies: 1 Views: 2,193 Ok, i have this program
It determines if the number entered is a prime or not.
I did that, posted it, and now i need to do this:
Determine and print the prime numbers between a user-specified... |
Forum: C++ Nov 20th, 2007 |
| Replies: 7 Views: 807 nvm nvm I figured it out! |
Forum: C++ Nov 20th, 2007 |
| Replies: 7 Views: 807 Ok, tried to format a little better, added some comments, but its not alot hehe.. anyways, my prog has a ways to go, but the last part I know how to do, its just taking out the prime numbers, and... |
Forum: C++ Nov 19th, 2007 |
| Replies: 7 Views: 807 Are you talking something along the lines like this, to eliminate all the numbesr divisible by two..
if so, my question is how would i print the subscript of the array if it is set to 1? again... |
Forum: C++ Nov 19th, 2007 |
| Replies: 7 Views: 807 I am working on homework, and been doing this assignment with absolutely no luck, i am in need of major help.
This is the assignment. Using an array, initialize all elements in the array to 1. ... |
Forum: C++ Nov 2nd, 2007 |
| Replies: 5 Views: 617 Requirement for homework is a double calcScore function, and i think it will work for this program because the number will never be larger than 10... |
Forum: C++ Nov 1st, 2007 |
| Replies: 5 Views: 617 seems to run ok when i go this
avg = (float)(s.getSum() - s.getMax() - s.getMin()) / 3.0);
i can compile it on my schools unix server without any problems and returns the decimal at the end...... |
Forum: C++ Nov 1st, 2007 |
| Replies: 5 Views: 617 without messing with the class, cause i cant modify it , i was wondering if there is a way to return thefunction calcscore as a float. I cant modify the class, where i call the function
"This... |
Forum: C++ Oct 31st, 2007 |
| Replies: 5 Views: 642 Wow awesome i finally got it, thanks for the help !!! like majorly couldnt of done without help.
I do have one last question. What do I do to start a loop for it all? from the part "is there another... |
Forum: C++ Oct 30th, 2007 |
| Replies: 5 Views: 642 Ok, i made a psot earlier but my code is alot different and different question so i didnt know where to put it.
My question is thiss... in my calcScore function. This is my requirement:
Design... |
Forum: C++ Oct 30th, 2007 |
| Replies: 1 Views: 1,006 Ok, i have been working on this program for a LONG time and i need some major help with the main.cpp file PLEASE.
I have to design a function that Designs and implements a function void... |
Forum: C++ Oct 16th, 2007 |
| Replies: 3 Views: 730 Ok I am not gettin this, sorry for the ignorance, hehe first program using functions. What would i implement into main from here. Again sorry spent hours trying to figure this out and writing and... |
Forum: C++ Oct 16th, 2007 |
| Replies: 3 Views: 730 I am so close to finsihing my homework im on last programmign assignment. I have the program written but i cant figure out what to take from main and put into my flip function. the teacher said it... |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 Its for homework, he told us to use functions but no arguements... mmm ill ask him when i go to class, which i am leaving for now. |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 I have one last question, I am running the program with the function flip()... I need the function flip() to return the value of heads and tails back into main, without using any arguments. sorry for... |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 thanks for all the help, I got the program to work without the function, just trying to do that now. Thnks! |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 I enter say 55, and I only get output of 1 and 0.. instead of like 25 were heads and 25 were tails.. just says 1 is heads and 0 was tails. |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 I need a user to enter the nubmer of times to flip the coin, then have it spit out how many were heads and tails. So like, I want to flip the coin 50 times. How many are heads and how many tails. |
Forum: C++ Oct 11th, 2007 |
| Replies: 16 Views: 1,834 This program was suppose to be with a function but I am trying to write without a function first, then adding one later. I am new to programming and still gettin basics. I got this much but its only... |
Forum: C++ Oct 4th, 2007 |
| Replies: 1 Views: 2,793 I have written a binary to decimal program. I have several loops. I was wondering if there is a command... Say the user is done entering binary numbers, cause the program was supposed to be made by... |
Forum: C++ Oct 4th, 2007 |
| Replies: 11 Views: 1,643 I dont know if this will help or not. It is homework and ive spent 2 days on it getting absolutely no where. the teacher never even explained how to use modulus, and I am really really stuck trying... |
Forum: C++ Oct 4th, 2007 |
| Replies: 11 Views: 1,643 No, not as a string number,
I need to enter a binary "111" and have the output be equal 7...
What I mean by decimal form is i need to convert the binary number to the decimal number that us ut... |
Forum: C++ Oct 4th, 2007 |
| Replies: 11 Views: 1,643 this is as far as i have as to seperating it into digits, I dont know where to begin to take that digit, then assign it the decimal value
#include <iostream>
using namespace std;
int main()... |
Forum: C++ Oct 4th, 2007 |
| Replies: 11 Views: 1,643 I read in the binary form "011010"
I having trouble getting it into digits, and assigning that digit the value in decimal form.
I can only use unsign, % and / ...
I am getting down how to... |
Forum: C++ Oct 4th, 2007 |
| Replies: 11 Views: 1,643 I just started c++ and programming and need some major help. I am trying to convert binary to decimal. I have searched through everything and its all to hard for me to understand,and uses terms ive... |