Hello,

Para realizar o cadastro, você pode preencher o formulário ou optar por uma das opções de acesso rápido disponíveis.

Welcome Back,

Por favor, insira suas informações de acesso para entrar ou escolha uma das opções de acesso rápido disponíveis.

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Captcha Click on image to update the captcha.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

PergunteAqui Latest Questions

  • 0
Anônimo(a)

questão de Linguagem C?

You must login to add an answer.

1 Answer

  1. Oi Mateus,

    Elaborei um programa em c++ usando o sort tipo inserir que realiza o trabalho proposto:
    #include
    using namespace std;

    int main()

    {
    int S[3];
    int k, x, y;
    k=0;
    while (k<3)
    {
    cout<<"Digite um numero"; cin>>S[k];

    k=k+1;
    }
    for(x=0; x<3; x++)

    {

    int indice_de_min = x;

    for(y=x; y<3; y++)

    {

    if(S[indice_de_min]>S[y])

    {

    indice_de_min = y;

    }

    }

    int temp = S[x];

    S[x] = S[indice_de_min];

    S[indice_de_min] = temp;

    }
    cout<<"Os numeros em ordem crescente sao..."; for (k=0; k<3; k++) {cout< null”);

    return 0;
    }

    Usei o compilador devC++ para compilar. Tecle cada numero e ENTER para inserir os numeros no programa. Um abraço

Related Questions