TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Programacao comercial

Por:   •  19/10/2015  •  Trabalho acadêmico  •  440 Palavras (2 Páginas)  •  145 Visualizações

Página 1 de 2

Função numero primo

bool NumeroPrimo(int numero)

{

    int i;

    if (numero <= 1)

        return false;

    for (i = 2; i * i <= numero; i++)

    {

        if (numero % i == 0)

            return false;

    }

    return true;

}

Classe agenda

public class AgendaTelefonica

{

        public AgendaTelefonica(string nome)

        {

        this.nome = nome;

        }

    public AgendaTelefonica(string nome, string telefone)

    {

        this.nome = nome;

        this.telefone = telefone;

    }

    public AgendaTelefonica(string nome, string email)

    {

        this.nome = nome;

        this.email = email;

    }

    // Método destructor

    ~ AgendaTelefonica()

    {

        // Código a ser executado quando o objeto for destruído

    }

    private string nome { get; set; }

    private string telefone { get; set; }

    private string email { get; set; }

    private string endereco { get; set; }

    private string cep { get; set; }

    private string tipoTelefone { get; set; }

    public bool incluir()

    {

        // Código para incluir o contato na agenda

...

Baixar como (para membros premium)  txt (1.5 Kb)   pdf (41.8 Kb)   docx (11.1 Kb)  
Continuar por mais 1 página »
Disponível apenas no TrabalhosGratuitos.com