Jump to content

Cópia descarada do tópico "ban the user above you"


Recommended Posts

█████████████████████████████████████████████████████████
.______        ___      .__   __.  __   _______   ______   
|   _  \      /   \     |  \ |  | |  | |       \ /  __  \  
|  |_)  |    /  ^  \    |   \|  | |  | |  .--.  |  |  |  | 
|   _  <    /  /_\  \   |  . `  | |  | |  |  |  |  |  |  | 
|  |_)  |  /  _____  \  |  |\   | |  | |  '--'  |  `--'  | 
|______/  /__/     \__\ |__| \__| |__| |_______/ \______/ 
█████████████████████████████████████████████████████████ 

Link to comment
Share on other sites

dXdm2GR.png

Spoiler

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication8
{
    class Program
    {
        static void Main(string[] args)
        {
            // Variáveis

            string usuario;
            string pergunta;

            // Inserção de dados

            Console.WriteLine("- Insira o nome do usuário que deseja banir:");
            usuario = Console.ReadLine();

            // Mensagem de confirmação

            Console.WriteLine("- O usuário que você escolheu foi " + "" + usuario);

            // Pergunta

            Console.WriteLine("- Deseja bani-lo?");
            pergunta = Console.ReadLine();

            // Condição

            if (pergunta == "Sim" || pergunta == "sim" || pergunta == "s")
            {

                Console.WriteLine("- O usuário " + "" + usuario + "" + " foi banido com sucesso!");
                Console.ReadKey();

            }
            if (pergunta == "Não" || pergunta == "não" || pergunta == "ñ" || pergunta == "n")
            {

                Console.WriteLine("- O usuário " + "" + usuario + "" + " não foi banido.");
                Console.ReadKey();

            }
            else
            {

                Console.WriteLine("- Não foi possível compreender sua resposta.");
                Console.ReadKey();

            }
        }
    }
}

 

 

Link to comment
Share on other sites

Consertei pra vc:
 

using System;
using System.Collections.Generic;
using System.Text;

namespace ban
{
    class Program
    {
        static int Main(string[] args)
        {
            if (args.Length == 1)
            {                
                string usuario = args[0];
                Console.WriteLine("- O usuário " + " " + usuario + " " + " foi banido com sucesso!");
                return 0;
            }
            else
            {
                Console.WriteLine("Uso: ban [Nome]");
                return -1;
            }
        }
    }
}

Banido... ಠ__ಠ

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...