Jump to content
Fórum Script Brasil
  • 0

Linguagem Portugol para C


Laryssa Silva
 Share

Question

Galera, estou precisando passar um codigo em Portugol para a linguagem C e estou meio perdida!

Alguém poderia me ajudar?

 

algoritmo L6P03;
var
 literal : X;

procedimento CAB( literal : NOME );
início
 imprima("=============================================");
 imprima(" UFMG - Universidade Federal de Minas Gerais");
 imprima(" ICEx - Instituto de Ciencias Exatas");
 imprima(" Disciplina de Programacao de Computadores");
 imprima(" NOME: ",NOME);
 imprima("=============================================");
fim

início
 leia(X);
 CAB(X);
fim
program L6P03;
var
 X : string;
procedure CAB(NOME : string);
begin
 writeLn('=============================================');
 writeLn(' UFMG - Universidade Federal de Minas Gerais');
 writeLn(' ICEx - Instituto de Ciencias Exatas');
 writeLn(' Disciplina de Programacao de Computadores');
 writeLn(' NOME: ',NOME);
 writeLn('=============================================');
end;
begin
 write('Informe o nome: ');
 readLn(X);
 CAB(X);
end.
function L6P03;
X = input('Entre com um nome: ','s');
CAB(X);
function CAB(NOME);
fprintf(1,'=============================================\n');
fprintf(1,' UFMG - Universidade Federal de Minas Gerais\n');
fprintf(1,' ICEx - Instituto de Ciencias Exatas\n');
fprintf(1,' Disciplina de Programacao de Computadores\n');
fprintf(1,' Nome: %s\n',NOME);
fprintf(1,'=============================================\n');

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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.

 Share



  • Forum Statistics

    • Total Topics
      149.9k
    • Total Posts
      646.8k
×
×
  • Create New...