You are on page 1of 1

Investigar en la web acerca del uso de constantes y variables en la creación de

programas. Cuadro comparativo con constantes y variables.

Variable Constante
int ejemplo = 0; const int ejemplo = 12.24;
char Nombre = ‘Maria’; const char Nombre = ‘Maria’;

Elaborar programas que incluyan declaraciones de constantes y variables.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tarea_III
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnProcesar_Click(object sender, EventArgs e)


{
const double PI = 3.1416;
String Radio1;
double Radio2 = 0;
double Area = 0;

Radio1 = txtRadio.Text;
Radio2 = Convert.ToDouble(Radio1);
Area = PI * (Radio2 * Radio2);

txtArea.Text = Convert.ToString(Area);
}
}
}

This study source was downloaded by 100000825906417 from CourseHero.com on 05-15-2022 21:54:13 GMT -05:00

https://www.coursehero.com/file/56241032/Tarea-3-1docx/
Powered by TCPDF (www.tcpdf.org)

You might also like