Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace LearnC
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool isMale = true;
- //intro
- Console.WriteLine("Welcome to the men only club");
- Console.WriteLine("Create an account to continue");
- //username input
- Console.Write("Pick a username: ");
- string username = Console.ReadLine();
- //password input
- Console.Write("Pick a Password: ");
- string password = Console.ReadLine();
- //gender CheckUp
- Console.WriteLine("What is your gender? ");
- string gender = Console.ReadLine();
- if (gender == "male")
- {
- Console.WriteLine("You are good to go");
- }
- else if (gender == "Male")
- {
- Console.WriteLine("You are good to go");
- }
- else
- {
- Console.WriteLine("Invalid argument");
- }
- //Using bools to verify if male or female
- if (gender == "male")
- {
- isMale = true;
- }
- else if (gender == "Male")
- {
- isMale = true;
- }
- else if (gender == "Female")
- {
- isMale = false;
- }
- else if (gender == "female")
- {
- isMale = false;
- }
- //path of male and path of female
- if (isMale == false)
- {
- Console.WriteLine("This is a men's club, you are not eligible to sign up");
- }
- else
- {
- Console.WriteLine("Welcome to the club! Your account is " + username + " and your password is " + password);
- }
- //equivalent to a loop, just to keep the program running
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement