#define's Profile User Rating: *****

Reputation: 1677 Grandmaster
Group:
Expert
Active Posts:
5,912 (2.32 per day)
Joined:
19-February 09
Profile Views:
49,141
Last Active:
User is offline Feb 06 2016 08:49 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
LandRover
Dream Kudos:
0
Expert In:
C/C++

Latest Visitors

Icon   #define has not set their status

Posts I've Made

  1. In Topic: Calculating price total and sales tax

    Posted 6 Feb 2016

    Hi, welcome to DIC.

    On the first iteration of the loop this would be correct:

    21   subtotal = price;
    
    


    but subsequently the subtotal would be overwritten with the new price.


    The subtotal is initialized to zero so you can do this :

    subtotal = subtotal + price;
    
    


    Basically it says that the new subtotal is equal to the old subtotal plus the price.
  2. In Topic: How do I store user input as an array of 0's and 1's?

    Posted 6 Feb 2016

    Hi, your instructions seem to suggest that the array is fixed in size - and being so, the values in the range are restricted. So arrays would be of the same size.

    You can picture the relationship between the index value and the set value :

    indexed values{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
    array a[10] = {0, 0, 1, 0, 1, 1, 0, 0, 0, 0}
    represents set{-, -, 2, -, 4, 5, -, -, -, -} 
    
    


    So a 1 in the array says yes this (index) value is present in the set.
  3. In Topic: Best way to handle multiple variable outputs?

    Posted 5 Feb 2016

    You could check it with some test code.

    eg
    findLowest(10000, 1000, 100, 10, 1);
    
    
  4. In Topic: Best way to handle multiple variable outputs?

    Posted 4 Feb 2016

    Balthazar's original function doesn't work. It is probable that north is always less than min, and if..elses are used.

    Finding the minimum value seems a good idea, though find it first, then it can be compared to each region.
  5. In Topic: Help with Guessing Game Assignment

    Posted 3 Feb 2016

    Hi, the program starts running from the beginning of the main function on line 27. On line 29 userGuess is created/declared. On line 43 userGuess is used in the while condition expression. Between line 29 and line 43 userGuess is not given a value, so is uninitialised before being used.

My Information

Member Title:
Duke of Err
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Delta Quadrant
Years Programming:
12
Programming Languages:
C,C++,HTML,CSS

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Comments

Page 1 of 1
  1. Photo

    moonlight1020 Icon

    07 Jul 2015 - 11:15
    http://www.dreamincode.net/forums/topic/378386-problem-with-char-array/page__st__15__gopid__2167449&#entry2167449
  2. Photo

    mireille4U Icon

    30 Apr 2015 - 05:44
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address ([email protected]) i will give you my picture.here is my mail address i hope we can move from here.above. Mireille
  3. Photo

    GryphonClaws Icon

    10 Jan 2013 - 01:15
    Thanks #define. I can't believe I missed such a simple detail.
  4. Photo

    raghav.naganathan Icon

    07 Nov 2012 - 20:40
    Dude...before your reputation changes, I would like to tell you that it(729) is a perfect cube :) Cheers :)
Page 1 of 1