Ir para conteúdo
Fórum Script Brasil

João Matheus S. Assis

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre João Matheus S. Assis

Contatos

  • Website URL
    http://programjm.blogspot.com.br/

Perfil

  • Gender
    Male
  • Location
    Valença/Ba

João Matheus S. Assis's Achievements

0

Reputação

  1. //ln(x)-4sen(x/5+3)+5cos(2x-5)+7 #include <math.h> #include <stdio.h> #include <stdlib.h> main(){ int X; float res; printf("X: "); scanf("%d",&X); res = log10(X)-4*sin(X/5+3)+5*cos(2*X-5)+7; printf("Resposta: %3.2f\n",res); system("pause"); }
  2. { Este programa recebe do usuário dois valores e exibe a soma, diferença e a multiplicação. } program Aritmeticas; uses crt; var num1,num2,opcao : integer; begin writeln ('CALCULADORA SIMPLES'); writeln; writeln ('<1> Soma'); writeln ('<2> Subtracao'); writeln ('<3> Multiplicacao'); writeln ('<4> Divisao'); writeln ('<5> Sair'); writeln; write ('Digite opcao: '); readln (opcao); if ((opcao<1) or (opcao>5)) then writeln ('não exite esta opcao!') else begin writeln; if (opcao=5) then writeln('Saindo do sistema...') else begin write ('Primeiro valor..: '); readln (num1); write ('Segundo valor...: '); readln (num2); writeln; if (opcao = 1) then writeln (num1,' + ',num2,': ',num1+num2); if (opcao = 2) then writeln (num1,' - ',num2,': ',num1-num2); if (opcao = 3) then writeln (num1,' * ',num2,': ',num1*num2); if (opcao = 4)then begin if (num2<>0) then writeln (num1,' / ',num2,': ',num1/num2:3:2) else writeln ('não exite divisao por zero!'); end; end; end; readkey; end.
  3. # include <stdio.h> # include <conio.h> main(){ int i,j,q; i = 0; q =0; j = 1; while (i<10){ q=q+j; // Soma os números impares j=j+2; // obtêm os números impares i++; // incrementa i } printf("Somatorio dos dez primeiros impares: %d",q); getch(); }
×
×
  • Criar Novo...