CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Guru_Kid

Search: Search took 0.03 seconds.

  1. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    Edited x)
  2. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    Solved. Thanks x)
  3. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    I changed what you suggested.

    My program still isn't coding correctly. It doesn't calculate the discount. Changed it a little.



    double cost;
    double total_cost;
    double value;
    int x;
  4. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    Updated the first post
  5. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    In my original post, I posted that it was declared as double.

    I'm not sure how you got 35. When I entered 20, I result is 500 (half * ( original x *50))
  6. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    What would I have to change/add to get the total cost after it calculates the discount?
  7. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    Re: If else then

    Thanks. I edited some of the things you suggested. However, the discount part of it still isn't working. I updated my first post.
  8. Thread: If else then

    by Guru_Kid
    Replies
    16
    Views
    5,657

    If else then

    It doesn't display the cost correctly. It just calculates the total x without taking into account the discount. What would I have to change/add to get the total cost after it calculates the discount?...
  9. Replies
    5
    Views
    1,220

    Re: Help w/ Program

    I'm having trouble with the remainder of the problem.

    int main()
    {
    int t, o, g, d;
    for (t = 0; t <= 9; t++)
    for (o = 0; o <=9; o++)
    for (g = 0; g <= 9; g++)
    for (d = 0; d <= 9; d++)
    {
  10. Replies
    7
    Views
    1,091

    Re: Simple C++ question

    Well the complier won't complie past

    if (x > 1 x 10-5)

    Would I have to convert the 1 x 10-5 to a decimal value or is there another way ?
  11. Replies
    7
    Views
    1,091

    Simple C++ question

    How would I code the negative value of an if else function? Would I just have to convert 1 x 10-5 to a decimal value?

    if (x > 1 x 10-5)
    {
    cout << "Value" << endl;
    {
    else
  12. Replies
    1
    Views
    529

    Something wrong while compling

    What's wrong with my if else then function? It complies (Dev C++) but it doesn't function properly. It displays all the messages together.
    I think I deleted something when I edited this x_x

    int...
  13. Replies
    5
    Views
    1,220

    Re: Help w/ Program

    What would you recommend
  14. Replies
    5
    Views
    1,220

    Help w/ Program

    I'm trying to solve a cryptarithmetic puzzle TOO + TOO + TOO + TOO = GOOD using a nested loop for single letter (in this case T, O, G, D).

    My solution to this, which I thought would be simple...
  15. Replies
    4
    Views
    1,834

    Re: Doesnt Display Characters

    Thanks for the tip but the characters aren't displaying
  16. Replies
    4
    Views
    1,834

    Doesnt Display Characters

    Fixing~
  17. Replies
    2
    Views
    462

    Warning Message

    Could someone help me with this?

    This is the warning message
    http://s5.tinypic.com/28ilonq.jpg


    Variables
    http://s5.tinypic.com/n1a5fk.jpg

    I know it should be an integer for the...
  18. Thread: Question

    by Guru_Kid
    Replies
    2
    Views
    722

    Question

    I'm not sure if this is the right forum but here it goes xD

    Could someone help solve these Arithmetic Operators? I'm not certain on the values I got.

    Given: int x = 5; What is the value of x...
Results 1 to 18 of 18





Click Here to Expand Forum to Full Width

Featured