how to do this trick..

This is a discussion on how to do this trick.. within the C Programming forums, part of the General Programming Boards category; i saw this think in which if i get a wrong input in a matrix like -1 rows or -2 ...

  1. #1
    Join Date
    Oct 2008

    how to do this trick..

    i saw this think in which
    if i get a wrong input in a matrix like
    -1 rows or -2 col s
    than its just re asks the question


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    1. Ask the question.
    2. If you don't like the answer, ask again.
    3. Repeat step 2 until done.

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    >> how to do this trick..

    Why don't the post the code you have so far? Also, you'd get much better responses if you learned how to ask more intelligent questions...
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  4. #4
    Join Date
    Oct 2007
    ...Learn how to use flowcharts and pseudo code.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Apr 2006
    I think this earns the award for the most vague question of the day:O.
    ★ Inferno provides Programming Tutorials in a variety of languages. Join our Programming Forums. ★

  6. #6
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Assuming you want to ensure variables are greater than one (need at least one row, I assume)...
    int num_rows;
    do {
      printf( "Enter number of rows: " );
      scanf( "%d", &num_rows );
    } while ( num_rows<1 );

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trick Question
    By @nthony in forum C Programming
    Replies: 16
    Last Post: 04-16-2009, 07:22 PM
  2. The reversed-comparison trick: an argument against
    By brewbuck in forum Tech Board
    Replies: 8
    Last Post: 02-24-2009, 09:25 PM
  3. Trick with strings help/questions
    By NoobieGecko in forum C Programming
    Replies: 2
    Last Post: 05-17-2008, 05:15 PM
  4. No! Another way to trick us men!!
    By Jeremy G in forum A Brief History of
    Replies: 15
    Last Post: 10-18-2004, 10:47 PM
  5. The Meaning of Life: A Trick Question?
    By chix/w/guns in forum A Brief History of
    Replies: 14
    Last Post: 07-12-2004, 08:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21