Skip to content

Instantly share code, notes, and snippets.

@Trochito
Created May 12, 2015 16:12
Show Gist options
  • Select an option

  • Save Trochito/df4c030cbd8ea3fdcfb4 to your computer and use it in GitHub Desktop.

Select an option

Save Trochito/df4c030cbd8ea3fdcfb4 to your computer and use it in GitHub Desktop.
Pitágoras C#
namespace Ejercicios_de_Clase {
class pitagoras {
static void Main(string[] args) {
double r;
double rc{x;
double x;
double y;
Console.WriteLine("Introduzca el valor X");
x = Double.Parse(Console.ReadLine());
Console.WriteLine("Introduzca el valor Y");
y = Console.ReadLine();
r = Math.Sqrt(Math.Pow(x,2)+Math.Pow(y,2));
Console.WriteLine("El valor de r es: ");
Console.WriteLine(r);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment