Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entrega dos exercicios de php #37

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions 20180913-Media/20180913-Media/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Média

Leia 2 valores de ponto flutuante de dupla precisão **A** e **B**, que correspondem a 2 notas de um aluno. A seguir, calcule a média do aluno, sabendo que a nota A tem peso 3.5 e a nota B tem peso 7.5 (A soma dos pesos portanto é 11). Assuma que cada nota pode ir de 0 até 10.0, sempre com uma casa decimal.

## Entrada
O arquivo de entrada contém 2 valores com uma casa decimal cada um.

## Saída
Calcule e imprima a variável **MEDIA** conforme exemplo abaixo, com 5 dígitos após o ponto decimal e com um espaço em branco antes e depois da igualdade.


## Exemplo
|Exemplos de Entrada | Exemplos de Saída|
|:------------------:|:----------------:|
5.0 |MEDIA = 6.43182 |
7.1 |





|Exemplos de Entrada | Exemplos de Saída|
|:------------------:| ----------------:|
0.0 | MEDIA = 4.84091
7.1 |

|Exemplos de Entrada | Exemplos de Saída|
|:------------------:|:----------------:|
|10.0 |MEDIA = 10.00000
|10.0

9 changes: 9 additions & 0 deletions 20180913-Media/20180913-Media/media.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php


$a= argv[1];
$b= argv[2];


$media = ($a*3.5 + $b*7.5/11);
echo "MEDIA =" .$media. "\n";
5 changes: 5 additions & 0 deletions 20181024-Distancia/distancia.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$distancia = 110;
$tempo = 30;
$area = $distancia / $tempo;
echo $area;
8 changes: 8 additions & 0 deletions 20181024-Produto-simples/produtoSimples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php


$a = "10";
$b = "500";

$prod = ( $a * $b );
echo "o produto é" .$prod. "/n";