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
??
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
??
1. Ask the question.
2. If you don't like the answer, ask again.
3. Repeat step 2 until done.
>> 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...
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
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. ★
Assuming you want to ensure variables are greater than one (need at least one row, I assume)...Code:int num_rows; do { printf( "Enter number of rows: " ); scanf( "%d", &num_rows ); } while ( num_rows<1 );