Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

ALGUEM ME AJUDA não sei se é areá certa (Faça um algoritmo que)

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Duvida ALGUEM ME AJUDA não sei se é areá certa (Faça um algoritmo que)

    9. Faça um algoritmo que:
    a) Leia o nome;
    b) Leia o sobrenome;
    c) Concatene o nome com o sobrenome;
    d) Apresente o nome completo.
    Similar Threads

  • Font Size
    #2
    Seria interessante você dizer qual linguagem deseja fazer esse algoritmo...
    Falar é fácil, me mostre o código.


    Comment


    • Font Size
      #3
      Vou partir da premissa que você esta começando agora a programar então aqui estão duas resoluções uma em C outra em python:

      Em C :
      #include <stdio.h>
      #include <stdlib.h>

      int main()
      {
      char nome[15], sobrenome[15];

      printf("Digite o nome: ");
      gets(nome);

      printf("Digite o sobrenome: ");
      gets(sobrenome);

      //nome completo
      printf("O nome completo eh:%s %s\n ", nome, sobrenome);

      system("pause");
      return 0;

      }

      Em python:

      n = raw_input ('Digite o primeiro nome: ')
      sn = raw_input ('Digite o sobrenome: ')
      print ('Nome completo:')
      print(n+sn)
      raw_input('Digite algo para sair')

      Comment


      • Font Size
        #4
        Tu pode concatenar em uma nova variável.

        Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...
        Yes, I am a criminal. My crime is that of curiosity. My crime is
        that of judging people by what they say and think, not what they look like.
        My crime is that of outsmarting you, something that you will never forgive me
        for.

        I am a hacker, and this is my manifesto. You may stop this individual,
        but you can't stop us all... after all, we're all alike.

        Comment

        X
        Working...
        X