answersLogoWhite

0


Best Answer

They are different things, don't interchange them. Example:

Version1:

if (you car is red) {

paint it to green;

}

if (you car is green) {

paint it to blue;

}

Version2:

if (you car is red) {

paint it to green;

} else if (you car is green) {

paint it to blue;

}

They do different things if you car was red originally.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why you prefer to use if-else structure instead of multiple if structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What word can be use instead of like?

Prefer of favor can be used instead of like.Example sentences:Would you prefer beef or chicken?He tends to favor blondes over brunettes.


What is the structure of density?

Density does not have a structure, it is just a measurement of grams per cubic centimeter (or whatever units you prefer).


What do Japanese people do instead of shaking hands?

The Japanese prefer to bow.


Why do economists prefer to compare real GDP figures for different years instead of GDP figures?

economists prefer to compare real gdp figures for different years instead of comparing nominal gdp figures. why?


Why are keyboard shortcut keys used instead of the mouse?

Because some people prefer using the keyboard instead of the mouse.


What are the best gay clubs?

Depends on which style of entertainment your into. I prefer dance clubs, but I know quite a few who prefer the strip clubs instead.


How was ancient china social structure?

It was pretty good. I prefer the new way but the ancient way structure was pretty nice and it got the job done.


Instead of sing or instead of singing?

I belive after a preposition we always use the gerund (ING form of the verb). i.e. Instead of flying we went driving; I prefer home-made food instead of eating out.


How do you draw gym leaders?

I would prefer searching this on google, instead of asking here...


Who said Counteract lobbying you don't like with lobbying you prefer instead?

James Madison


Can a adult man be gay and still prefer women for sex?

No, maybe bi instead/


Why do European guys prefer Speedos instead of trunks like Americans?

fashion i suppose