Hello Everyone! What is there a difference in the two equations?
if ((a<b)&&(c<d)&&(e<f)) {
do something;}
and
if((a<b)&&(c<d)){
if(e<f){
do something;}
}
(
Hello Everyone! What is there a difference in the two equations?
if ((a<b)&&(c<d)&&(e<f)) {
do something;}
and
if((a<b)&&(c<d)){
if(e<f){
do something;}
}
(
Nothing. They are equivalent
They're the same- why do you ask?
There is a subtlety to it though. In some languages, all those terms are evaluated. In C++ they are not. It runs left to right and stops when it has the answer. I.e. If a>=b, it doesn't need to check the rest.
Yes I remember that from Cobol...or was it Fortran...LOL.
Comparing distance, speed and time for movement of a flight simulator
house231:
l...or was it Fortran...LOL.Comparing distance, speed and time for movement of a flight simulator
pls define : Fiv or F77
LOL LOL LOL
wildbill:
They're the same- why do you ask?
Do these terms: 'same' and 'equivalent (Post#1)' carry the identical expansion in Programming Language?