Is there a room in the IF statement? You got Money? Are you capable?

Source: Internet
Author: User

Train of thought: 1, if have room, can talk

2, if there is no room, ask the second condition of money, if there is, can talk

3, if no room without money, then ask the third condition has the ability, if there is, can talk

4, if the above three conditions are not, then bye

Console.WriteLine ("do you have any money? "); stringQ =Console.ReadLine (); if(q = ="have a") {Console.WriteLine ("local tyrants, let's be friends! "); }            Else if(q = ="No") {Console.WriteLine ("do you have a house? "); stringf =Console.ReadLine (); if(f = ="have a") {Console.WriteLine ("we can talk."); }                Else if(f = ="No") {Console.WriteLine ("do you have a car? "); stringc =Console.ReadLine (); if(c = ="have a") {Console.WriteLine ("Please, I'll go for a ride."); }                    Else if(c = ="No") {Console.WriteLine ("do you have the power? "); stringn =Console.ReadLine (); if(n = ="have a") {Console.WriteLine ("we can have a relationship, try ."); }                        Else if(n = ="No") {Console.WriteLine ("Roll Duzi! "); }                        Else{Console.WriteLine ("We're not on a channel! "); }                    }                    Else{Console.WriteLine ("Please speak! "); }                }                Else{Console.WriteLine ("Please speak! "); }            }            Else{Console.WriteLine ("Please speak! "); }

Is there a room in the IF statement? You got Money? Are you capable?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.