Search:

Type: Posts; User: Sembhi

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,415

    Computer guessing a number

    Need help.
  2. Replies
    11
    Views
    1,449

    Then why does the total display?

    Then why does the total display?
  3. Replies
    11
    Views
    1,449

    ^ Thanks. #include int...

    ^ Thanks.


    #include <iostream.h>

    int main()
    {
    int sum = 0;
    int num;
    int total = 0;
  4. Replies
    11
    Views
    1,449

    Yea I know, I'm just trying to get one to work...

    Yea I know, I'm just trying to get one to work first.

    Can someone take a look at the code posted above and tell me whats wrong with it?
  5. Replies
    11
    Views
    1,449

    What I had in mind was using if, setting the...

    What I had in mind was using if, setting the first number entered to a variable called temporary, and have all the numbers entered compared to that, if the number entered bigger/smaller have that...
  6. Replies
    11
    Views
    1,449

    Saving the largest and smallest numbers.

    I have a program where the user has to input numbers over and over, if they want to end the program they hit 0. After they hit zero though I have to display the largest and smallest numbers they...
  7. Replies
    11
    Views
    2,331

    Got it. Thank you.

    Got it. Thank you.
  8. Replies
    11
    Views
    2,331

    OK I get what you're saying but I'm not sure how...

    OK I get what you're saying but I'm not sure how to put that into code.
  9. Replies
    11
    Views
    2,331

    Yea I saw. Thanks for the help. Works fine now. ...

    Yea I saw. Thanks for the help. Works fine now.

    The reason I had sum = 0 was because the problem told me. Not sure why though. Oh well, that one is done.

    I'm starting on the one I had...
  10. Replies
    11
    Views
    2,331

    Still confused. This is what I have. do {...

    Still confused. This is what I have.


    do
    {
    cout << "Enter a number (Enter 0 to quit): ";
    cin >> num;

    total = num;
    total = total + num;
  11. Replies
    11
    Views
    2,331

    Yea that does. Need help with another program...

    Yea that does.

    Need help with another program real quick. I have to keep getting a number from the user until they enter 0. I also need to add up all the numbers they enter and display it. How do...
  12. Replies
    11
    Views
    2,331

    No idea on how to do this...

    "Write a program that uses nested loops to produce the following output.
    A1B1B2B3A2B1B2B3"

    Any tips on where I should start?
  13. Replies
    7
    Views
    1,225

    For some reason it won't let me find out a final...

    For some reason it won't let me find out a final score out of 100.

    I'm dividing the total number they got correct out of the total number of questions then multiplying by 100 and it's not coming...
  14. Replies
    7
    Views
    1,225

    How would I write a code that shows the user how...

    How would I write a code that shows the user how many correct answers they got?
  15. Replies
    7
    Views
    1,225

    Gah! Knew it would be something stupid. Thanks.

    Gah! Knew it would be something stupid. Thanks.
  16. Replies
    7
    Views
    1,225

    Trying to do a simple thing...

    I'm asking the user if they are ready to begin.

    #include <iostream.h>

    int main()
    {
    int a; // start;
    int answer_one; // answer to number one
    int answer;
  17. Replies
    18
    Views
    1,721

    Ok having a problem. I have to multiply the total...

    Ok having a problem. I have to multiply the total before the shipping cost (which is double) by the shipping cost (which is a int because it's in a switch). I keep getting another weird answer. It...
  18. Replies
    18
    Views
    1,721

    Gosh what a stupid mistake. Thanks for the help.

    Gosh what a stupid mistake. Thanks for the help.
  19. Replies
    18
    Views
    1,721

    Here is my code/ #include ...

    Here is my code/



    #include <iostream.h>
    #include <iomanip.h>

    int main()
    {
  20. Replies
    18
    Views
    1,721

    Getting a really stupid problem. fst = food...

    Getting a really stupid problem.


    fst = food * o;

    cout << "Your subtotal is $" << fst << endl;


    Answer is coming out to some negative huge number. What could be the problem?
  21. Replies
    18
    Views
    1,721

    Oh I figured it out. I need to have 3 different...

    Oh I figured it out. I need to have 3 different switches because they may want more than one type of sandwch.
  22. Replies
    18
    Views
    1,721

    I'm a little confused because on our paper it...

    I'm a little confused because on our paper it said something about using 3 different switch structures. Where would I need this?
  23. Replies
    18
    Views
    1,721

    Alright thanks. I just need your guys advice...

    Alright thanks.

    I just need your guys advice on what I should to do complete this program.

    I have to ask the user what type of sandwich they would like (3 choices, each has different price)....
  24. Replies
    18
    Views
    1,721

    How do I ask the user how much of the food they...

    How do I ask the user how much of the food they picked they want and make it display that?

    How would I multiply only the sandwich they order by the price?
  25. Replies
    18
    Views
    1,721

    Need help using switch

    I have to write a program asking the user what type of sandwich they would like. I know how to do that part using switch but how do I get it to show the price only for that sandwich.

    This is what...
Results 1 to 25 of 35
Page 1 of 2 1 2