C sharp - NO SE QUE HACER PARA PODER HACER ESTOS POLINOMIOS

 
Vista:

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();

}
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:NO SE QUE HACER PARA PODER HACER ESTOS POLINOMI

Publicado por Juan Manuel Castañeda (71 intervenciones) el 13/04/2010 01:23:34
int[,4] polinomio;
pubic void CrearPolinomio(int cantMonomios){
polinomio=new int[cantMonomios,3];
for(int i=0: i<cantmonomkios;i++)
for(int j=0,j<3;j++)
polinomio[i,j]=int.Parse(Console.ReadLine());
}
public long[] Suma(){

long[] s=new long[2];
for(int i=0: i<polinomio.Length;i++)
for(int j=0,j<3;j++)
s[1]+=polinomio[i,j];
for(int i=0,i<3;i++)
for(int j=0,j<polinomio.Length-1;j++)
s[0]+=polinomio[j,i];
return s;
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar