Created
May 12, 2015 16:12
-
-
Save Trochito/df4c030cbd8ea3fdcfb4 to your computer and use it in GitHub Desktop.
Pitágoras C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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