C # Marriage Example

Source: Internet
Author: User

Console.title = "marriage Example";
BOOL A, B, C;
String y;
Console.WriteLine ("There is a room?" (y/n) ");
y = Console.ReadLine ();

A = Convert.toboolean (y = = "Y" | | y = "y")? 1:0);

Console.WriteLine ("Got a Car?") (y/n) ");
y = Console.ReadLine ();
b = Convert.toboolean (y = = "Y" | | y = "y")? 1:0);

Console.WriteLine ("Rich?") (y/n) ");
y = Console.ReadLine ();
c = Convert.toboolean (y = = "Y" | | y = "y")? 1:0);
if (a&b&c)
{
Console.WriteLine ("Can continue to understand");
}
else if (a&b)
{
Console.WriteLine ("Wait Till You have Money");
}

else if (a&c)
{
Console.WriteLine ("Wait till you have a car");
}
else if (b&c)
{
Console.WriteLine ("Wait for your room to say it");
}
else if (a)
{
Console.WriteLine ("When you have a car to have money to say it Again");
}
else if (b)
{
Console.WriteLine ("When you have a room to have money to say it Again");
}
else if (c)
{
Console.WriteLine ("Wait till you have a car in your room");
}
Else
{
Console.WriteLine ("When you have a car and you have money to talk about it");
}

C # Marriage Example

Related Article

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.