ALGORITMOS DE C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static
void Main(string[] args)
{
sbyte A = 0;
Console.WriteLine("dame_el_valor_A");
A = Convert.ToInt32(Console.ReadLine(.));
byte
B = 0;
Console.WriteLine("dame_el_valor_B");
B = Convert.ToInt32(Console.ReadLine(.));
short C = 0;
Console.WriteLine("dame_el_valor_C");
C = Convert.ToInt32(Console.ReadLine(.));
ushort D = 0;
Console.WriteLine("dame_el_valor_D");
D = Convert.ToInt32(Console.ReadLine(.));
int
E = 0;
Console.WriteLine("dame_el_valor_E");
E = Convert.ToInt32(Console.ReadLine(.));
uint
F = 0;
Console.WriteLine("dame_el_valor_F");
F = Convert.ToInt32(Console.ReadLine(.));
long G = 0;
Console.WriteLine("dame_el_valor_G");
G = Convert.ToInt32(Console.ReadLine(.));
ulong
H = 0;
Console.WriteLine("dame_el_valor_H");
H = Convert.ToInt32(Console.ReadLine(.));
float I = 0;
Console.WriteLine("dame_el_valor_I");
I = Convert.ToInt32(Console.ReadLine(.));
double
J = 0;
Console.WriteLine("dame_el_valor_J");
J = Convert.ToInt32(Console.ReadLine(.));
decimal
M = 0;
Console.WriteLine("dame_el_valor_M");
M = Convert.ToInt32(Console.ReadLine(.));
bool
N = 0;
Console.WriteLine("dame_el_valor_N");
N = Convert.ToInt32(Console.ReadLine(.));
char
X = 0;
Console.WriteLine("dame_el_valor_X");
X = Convert.ToInt32(Console.ReadLine(.));
string
Y = 0;
Console.WriteLine("dame_el_valor_Y");
Y = Convert.ToInt32(Console.ReadLine(.));
object
Z= 0;
Console.WriteLine("dame_el_valor_Z");
Z = Convert.ToInt32(Console.ReadLine());
}
}
}
C# NUEVO PARA VALORES
namespace ConsoleApplication1
{
class Program
{
static
void Main(string[] args)
{
int A = 0;
int B = 0;
int C = 0;
Console.WriteLine("Dame_el_valor_A");
A = Convert.ToInt16(Console.Read());
Console.WriteLine("Dame_el_valor_B");
B = Convert.ToInt16(Console.Read());
Console.WriteLine("Dame_el_valor_C");
C = Convert.ToInt16(Console.Read())
double D = 0;
double F = 0;
double E = 0;
ALGORITMO EN C#
using System;
using System.Collections.Generic;
using System.Linq;
using
System.Text;
namespace ConsoleApplication1
{
class Program
{
static
void Main(string[] args)
{
int
A = 0;
int
B = 0;
int
R = 0;
Console.WriteLine("Dame_el_valor_A");
A = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Dame_el_valor_B");
B = Convert.ToInt16(Console.ReadLine());
R
= A + B;
Console.Write("La_suma_es_igual_a",
R);
}
}
}
C# DE CONSOLA
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class
Program
{
static void
Main(string[] args)
{
int
nombre = "nombre";
int
apellido_paterno = "tu apellido";
int
apellido_materno = "tu apellido";
Console.WriteLine("dame_tu_nombre");
nombre =
Convert.ToInt32(Console.Read());
Console.WriteLine("dame_tu_apellido_paterno");
nombre =
Convert.ToInt32(Console.Read());
Console.WriteLine("dame_tu_apellido_materno");
nombre =
Convert.ToInt32(Console.Read());
}
}
}