Results 1 to 3 of 3

Thread: What is nested if statement?

  1. #1
    jaminee is offline Senior Member+
    Last Online
    30th September 2015 @ 07:02 AM
    Join Date
    25 Mar 2009
    Location
    Mandi Bahauddin
    Age
    40
    Posts
    91
    Threads
    21
    Credits
    838
    Thanked
    0

    Smile What is nested if statement?



    Please Koi batay k nested if statement kia hai or is koi example b batain aap ki mehrbani ho ghee.plz Plz Plz

  2. #2
    knowldge_hunter is offline Senior Member+
    Last Online
    19th February 2010 @ 12:52 AM
    Join Date
    26 Oct 2009
    Posts
    44
    Threads
    4
    Credits
    945
    Thanked: 1

    Default

    walikumslam hamary teacher ne aj he parhya hay. nested if ko explain kerna mujy nahi ata lakin example yeh hay
    for(int i=1;i<=10;i++)
    for(int j=1;j<=10;j++)
    cout<<i<<j" ";
    yeh is ka syntax hay is ka output kuch is terha hoga (jo mujy smjh mien aya baqi ap sir mooed sey smjh lena)
    key i aur j ki values ko mila ker print hoga jesy 12 11 10 ......... isi terha
    kiuon key mein new hun tu mujy zada nahi ata mein khud student hun ager smjh nay aye tu dont mind plz

  3. #3
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Here is an example of nested if statement:
    Code:
        if ( condition1  )
        statement1 ;
        else if ( condition2 )
        statement2 ;
        . . .
        else if ( condition-n )
        statement-n ;
        else
        statement-e ;
    its very easy to understand..

    like if i am here then i can do this;
    else if i am not here on time i cant;
    else i cant do this;

    its like testing a condition.

Similar Threads

  1. Class # 2.2 => if-else statement
    By Abdul Moeed in forum C++
    Replies: 58
    Last Post: 11th June 2014, 10:45 AM
  2. Solved Nested for loop C++
    By Muzafar_B in forum C++
    Replies: 10
    Last Post: 8th April 2014, 10:13 PM
  3. Zardari's statement
    By Sohail in forum Videos
    Replies: 14
    Last Post: 21st September 2008, 12:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •