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
| // WINDOWS FORMS | |
| //CREAR UN ARCHIVO | |
| private void buttonAccion_Click(object sender, EventArgs e) | |
| { | |
| StreamWriter Archivo; | |
| Archivo = File.CreateText(textBoxNomArchivo.Text); | |
| Archivo.Close(); | |
| MessageBox.Show("El archivo ha sido creado correctamente"); |
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
| // holamundo.cs | |
| // declaración de la clase | |
| public class HolaMundo | |
| { | |
| // método principal | |
| public static void Main() | |
| { | |
| // escribe un mensaje por el terminal | |
| System.Console.WriteLine("¡Hola, Mundo!"); |
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
| Proceso Pitagoras | |
| definir x,y,r Como Real;; | |
| Escribir "Introduzca el valor X"; | |
| Leer x; | |
| Escribir "Introduzca el valor Y"; | |
| Leer y; | |
| r= rc(x^2+y^2); | |
| Escribir "El valor de r es: "; | |
| Escribir r; | |
| FinProceso |
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()); |