------------------------------------------------------------------------------------------------------------Like previous today you decided to go your home town, But you stuck in traffic jam.
Authour:I will teach you courses online
C Language | C++ | Asp.net | VB.net | Oracle | Hardware and Networking | MCSE |
Contact: | Name: Shrinivas | Mobileno:9703619391 | E-mail: vas.shrinivas002@gmail.com |
At that moment you r thinking that IF i reach railway station at 10:00 am i can catch train, else 11:00 am BUS is their else 12:00 pm private traveler are their.
if (time < 10 )
document.write("I catch the train");
else if (time < 11 )
document.write("I catch the bus");
else if(time < 12)
document.write("I catch the private bus");
Other example
Let us assume that you went for run race. Before starting run race they announced if anybody wins prize is 1 lakh
second prize is 50 thousand
third prize is 25 thousand
Obviously you want 1 lakh that is 1 prize.
if(score==1)
document.write("Award is 1 laksh rupeees");
else if(score==2)
document.write("Award is 50 thousand rupeees");
else if(score==3)
document.write("Award is 25 thousand");
----------------------------------------------------------------------------------------------------------
No comments:
Post a Comment