Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Atividade2Ex2
- {
- public class Matematica
- {
- public static float RegraDeTres(float n1, float n1r, float n2)
- {
- float x = (n1r * n2) / n1;
- return x;
- }
- public static float Hipotenusa(float CatAdj, float CatOpost)
- {
- float h = (CatAdj * CatAdj) + (CatOpost * CatOpost);
- return h;
- }
- public static float AreaTrapezio(float BMaior, float BMenor, float h)
- {
- float a = (BMaior + BMenor) * h / 2;
- return a;
- }
- public static float[] Bhaskara(float a, float b, float c)
- {
- float[] resultado = new float[2];
- float delta = (b * b) - 4 * a * c;
- resultado[0] = (-b + delta) / (2 * a);
- resultado[1] = (-b - delta) / (2 * a);
- return resultado;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment