NO SE QUE HACER PARA PODER HACER ESTOS POLINOMIOS
Publicado por MARLONC (3 intervenciones) el 12/04/2010 01:19:40
TENGO CIENTOS DE ERRORES COMO LOS SOLUCIONO?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace polnomioo
{
class polinomio
{
public int x, y, z;
public int mon1, mon2, mon3;
public int mon4, mon5, mon6;
public int mon7, mon8, mon9;
public int operar;
public int m1, m2, m3, m4, m5, m6, m7, m8, m9;
public int respuesta, resultado;
public int monx, mony, monz;
public int calcular_polinomio()
{
if (respuesta == 3)
{
Console.WriteLine("Por Favor Ingrese Los Monomios De La Forma (x+y+z)+(x+y+z)+(x+y+z)");
m1 = int.Parse(Console.ReadLine());
m2 = int.Parse(Console.ReadLine());
m3 = int.Parse(Console.ReadLine());
m4 = int.Parse(Console.ReadLine());
m5 = int.Parse(Console.ReadLine());
m6 = int.Parse(Console.ReadLine());
m7 = int.Parse(Console.ReadLine());
m8 = int.Parse(Console.ReadLine());
m9 = int.Parse(Console.ReadLine());
operar = mon1 + mon4 + mon7;
operar = Console.ReadLine().Length;
monx = operar;
operar = mon2 + mon5 + mon8;
operar = Console.ReadLine().Length;
mony = operar;
operar = mon3 + mon6 + mon9;
operar = Console.ReadLine().Length;
monz = operar;
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
if (respuesta == 2)
{
operar = mon1 + mon4;
operar = Console.ReadLine().Length;
monx = operar;
operar = mon2 + mon5;
operar = Console.ReadLine().Length;
mony = operar;
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
if (respuesta == 1)
{
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
Console.WriteLine("Ingrese Un Numero Entre 2 y 3");
}
}
}
}
}
}
class Program
{
static void Main(string[] args)
{
int mon1,mon2,mon3;
int mon4,mon5,mon6;
int mon7,mon8,mon9;
int resultado,polin,respuesta;
Console.WriteLine("Teniendo En Cuenta Que Un Polinomio Puede Constar 2,3 O Mas Terminos, Osea Tanto Un Binomio, Como Un Trinomio Son Polinomios Diga Que Operacion Va A Operar");
Console.WriteLine("Binomio=2,Trinomio=3");
respuesta=int.Parse(Console.ReadLine());
polin = new calcular_polinomio();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace polnomioo
{
class polinomio
{
public int x, y, z;
public int mon1, mon2, mon3;
public int mon4, mon5, mon6;
public int mon7, mon8, mon9;
public int operar;
public int m1, m2, m3, m4, m5, m6, m7, m8, m9;
public int respuesta, resultado;
public int monx, mony, monz;
public int calcular_polinomio()
{
if (respuesta == 3)
{
Console.WriteLine("Por Favor Ingrese Los Monomios De La Forma (x+y+z)+(x+y+z)+(x+y+z)");
m1 = int.Parse(Console.ReadLine());
m2 = int.Parse(Console.ReadLine());
m3 = int.Parse(Console.ReadLine());
m4 = int.Parse(Console.ReadLine());
m5 = int.Parse(Console.ReadLine());
m6 = int.Parse(Console.ReadLine());
m7 = int.Parse(Console.ReadLine());
m8 = int.Parse(Console.ReadLine());
m9 = int.Parse(Console.ReadLine());
operar = mon1 + mon4 + mon7;
operar = Console.ReadLine().Length;
monx = operar;
operar = mon2 + mon5 + mon8;
operar = Console.ReadLine().Length;
mony = operar;
operar = mon3 + mon6 + mon9;
operar = Console.ReadLine().Length;
monz = operar;
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
if (respuesta == 2)
{
operar = mon1 + mon4;
operar = Console.ReadLine().Length;
monx = operar;
operar = mon2 + mon5;
operar = Console.ReadLine().Length;
mony = operar;
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
if (respuesta == 1)
{
Console.WriteLine("El Resultado Es=" + resultado);
}
else
{
Console.WriteLine("Ingrese Un Numero Entre 2 y 3");
}
}
}
}
}
}
class Program
{
static void Main(string[] args)
{
int mon1,mon2,mon3;
int mon4,mon5,mon6;
int mon7,mon8,mon9;
int resultado,polin,respuesta;
Console.WriteLine("Teniendo En Cuenta Que Un Polinomio Puede Constar 2,3 O Mas Terminos, Osea Tanto Un Binomio, Como Un Trinomio Son Polinomios Diga Que Operacion Va A Operar");
Console.WriteLine("Binomio=2,Trinomio=3");
respuesta=int.Parse(Console.ReadLine());
polin = new calcular_polinomio();
}
}
Valora esta pregunta
0