RESOLUCION DE SISTEMAS LINEALES
Publicado por Norma Angelica (1 intervención) el 26/03/2001 01:51:54
HOLA, ESTOY IMPLEMENTANDO UNOS ALGORITMOS PARA MI CLASE DE METODOS NUMERICOS, PERO AL MOMENTO DE COMPILAR MI PROGRAMA ME DICE QUE CUANDO EN MAIN LLAMO A MIS FUNCIONES HAY UN ERROR EN LA COMPATIBILIDAD, PUEDE SER UN POCO TORPE MI ERROR, PERO SI ME AYUDAN, SE LOS AGRADECERE EN EL ALMA.
este es mi codigo:
#include <stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<conio.h>
#include<math.h>
int N,k,i,j,niteracion;
double TOL;
double *x1, *x2, *x3;
const MAX=20;
float a[MAX][MAX];
char opcion;
int GaussSeidel(int N,float a[MAX][MAX],double *b, double *x);
int Jacobi(int N,float a[MAX][MAX],double *b, double *x);
void main()
{
int i,j,k,N,niteracion;
printf("Introduzca el número de incógnitas a buscar:");
scanf("%d",&N);
printf("Introduza el número de iteraciones que desea que se realicen:");
scanf ("%d",&k);
printf("Indique la tolerancia deseada:");
scanf ("%d",&TOL);
printf("\n\nInserte los elementos del termino b \n");
printf("\nSeparados por un espacio\n");
x1 = (int *)calloc(N, sizeof (double));
for (i=0; i<N; i++)
fscanf(stdin,"%lf",&x1[i]);
printf("\n\nInserte el vector solución inicial:");
printf("\nElementos separados por un espacio\n");
x2 = (int*) calloc(N, sizeof (double));
for (i=0; i<N;
este es mi codigo:
#include <stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<conio.h>
#include<math.h>
int N,k,i,j,niteracion;
double TOL;
double *x1, *x2, *x3;
const MAX=20;
float a[MAX][MAX];
char opcion;
int GaussSeidel(int N,float a[MAX][MAX],double *b, double *x);
int Jacobi(int N,float a[MAX][MAX],double *b, double *x);
void main()
{
int i,j,k,N,niteracion;
printf("Introduzca el número de incógnitas a buscar:");
scanf("%d",&N);
printf("Introduza el número de iteraciones que desea que se realicen:");
scanf ("%d",&k);
printf("Indique la tolerancia deseada:");
scanf ("%d",&TOL);
printf("\n\nInserte los elementos del termino b \n");
printf("\nSeparados por un espacio\n");
x1 = (int *)calloc(N, sizeof (double));
for (i=0; i<N; i++)
fscanf(stdin,"%lf",&x1[i]);
printf("\n\nInserte el vector solución inicial:");
printf("\nElementos separados por un espacio\n");
x2 = (int*) calloc(N, sizeof (double));
for (i=0; i<N;
Valora esta pregunta


0