Search:

Type: Posts; User: ninety3gd

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thank you all got what I needed...

    Thank you all got what I needed...
  2. Question about mixed data types- with division

    Question about the expressions below:


    cout << 17 / 3.0 << endl;
    cout << 12.0 / 6 << endl;

    5.66667
    2

    I realize about / and integer but why do I get an double result for the first...
  3. Replies
    14
    Views
    1,849

    Removal of gotos

    Finally back at looking through code...I am trying to eliminate the gotos in the sudoku function below:


    I have eliminated simple gotos before...


    double sum = 0.0;

    int x = 1;
    ...
  4. Replies
    5
    Views
    28,111

    You can use % with C# or Java with real values...

    You can use % with C# or Java with real values...
  5. Thread: 25x25 sudoku

    by ninety3gd
    Replies
    27
    Views
    17,698

    Well I have a sudoku solver- in C++ that finds...

    Well I have a sudoku solver- in C++ that finds one, many, or no solutions...bad thing is the input I would have to type in by hand...unless I read it in a text file....
  6. Replies
    9
    Views
    17,757

    CH is correct- trunc is available in C99...

    CH is correct- trunc is available in C99 standard:

    trunc- Truncate to nearest integral value:

    double trunc(double x);

    returns x rounded to the integer nearest to it but no larger in magnitude
  7. Replies
    9
    Views
    17,757

    I always thought that if the values are integer...

    I always thought that if the values are integer and positive the would both return the same value...but that is the only time that is the case...


    (int) floor (1.1) = 1
    (int)1.1 = 1

    If they...
  8. Replies
    23
    Views
    6,429

    Nope, just pointing out that fact...Allready...

    Nope, just pointing out that fact...Allready finished school-good exercise though
  9. Replies
    23
    Views
    6,429

    Doesn't look like your finished...still need to...

    Doesn't look like your finished...still need to print the final product result...which you do not seem to have...
  10. Replies
    9
    Views
    1,159

    A you trying numerical differentiation..if so. ...

    A you trying numerical differentiation..if so.

    I would test that with some tolerance level:

    tolerance a very small number

    enter desired tolerance

    ...
    while (tolExceded && something)
  11. Replies
    3
    Views
    2,049

    Go it to work- used the loop as sugguested...

    Go it to work- used the loop as sugguested...
  12. Replies
    3
    Views
    2,049

    Rewrite code in structure way

    Trying to eliminate a goto: from Schaums C++ book


    double sum = 0.0;

    int x = 1;
    repeat: sum += 1.0 / x++;

    if (x <= N)
    goto repeat;
  13. Replies
    6
    Views
    63,800

    figured out my problem- thanks for all of the...

    figured out my problem- thanks for all of the insight
  14. Replies
    6
    Views
    63,800

    Using the log properties- math

    Kind of an offshoot of my previous post but this has to do with logarithmic properties

    Change of base:

    logbX = logaX/logaB

    and

    logb(X/Y ) = logbX - logbY
  15. Replies
    6
    Views
    1,680

    Got it bithub...I just what look right from the...

    Got it bithub...I just what look right from the texts on the matter

    Forgot to find the parameter problem..and the caveat about getline...
  16. Replies
    25
    Views
    2,791

    here is how I would use a string with a struct; ...

    here is how I would use a string with a struct;


    struct exam
    {
    string name;
    };

    int main()
    {
  17. Replies
    6
    Views
    1,148

    Sorry got my C/C++ confused- as mention needed to...

    Sorry got my C/C++ confused- as mention needed to fix


    struct a
    {
    char name[50];
    int i;
    };

    int main(void)
  18. Replies
    6
    Views
    1,148

    All thought I am brushing back up on C/C++ I...

    All thought I am brushing back up on C/C++ I would try to solve the problem without using pointers- then make change to pointers


    struct a
    {
    char name[50];
    int i;
    }

    int main(void)
  19. Replies
    6
    Views
    1,680

    I would try the following- change... string...

    I would try the following- change...


    string user_information ( string name1, string name2)
    {

    cout << "Please give me your first name ";
    cin >> name1;
    cout << "Please give me your last...
  20. Replies
    3
    Views
    61,193

    Basically I trying to find an all purpose...

    Basically I trying to find an all purpose formula- derived from the following..

    A loop where the loop control body is multiplied or divided...

    for (i = m; i < n; i *= x)
    do something

    If the...
  21. Replies
    3
    Views
    61,193

    logarithmic loop calculations

    Help with math calc

    Calculating efficiency of loops from both

    Gilberg and Hortsmann books...


    Logarithmic Loops (multiplication and division):
  22. Replies
    9
    Views
    1,388

    Do you have a textbook or use other sources to...

    Do you have a textbook or use other sources to help as well?
  23. Replies
    4
    Views
    2,764

    //eliminate the coefficients of X(I) for (i =...

    //eliminate the coefficients of X(I)
    for (i = k + 1; i < n; i++)
    {
    mult = a[i][k] / a[k][k];
    b[i] = b[i] - b[k] * mult; //compute constants
    for (j = k; j < n; j++) //compute...
  24. Replies
    4
    Views
    2,764

    Help with output

    Have the following Gauss Elim code from text:

    Not printing out correct code:


    SOLUTION OF SIMULTANEOUS LINEAR EQUATIONS
    USING GAUSSIAN ELIMINATION

    This program uses...
  25. Replies
    2
    Views
    2,069

    Off by a penny problem

    Getting the off by a penny problem...

    Enter an amount in double, for example 11.56: 12.35
    Your amount 12.35 consists of
    12 dollars
    1 quarters
    0 dimes
    1 nickels
    4 pennies
Results 1 to 25 of 39
Page 1 of 2 1 2