主题:求助:“0x00401104”指令引用的“0xffc97130”内存。该内存不能为“read”。
“0x00401104”指令引用的“0xffc97130”内存。该内存不能为“read”。
# include <stdio.h>
# include <math.h>
#include<iostream.h>
#include "stdlib.h"
#include <string.h>
# define N 10 /*矩阵维度*/
void main()
{
int i,j;
double a[N][N];
for(i=1;i<=N;i++) /*初始化矩阵*/
{
for(j=1;j<=N;j++)
{
if(j==i)
a[i][j]=1.5*cos(i+1.2*j);
else
a[i][j]=sin(0.5*i+0.2*j);
printf("%f ",a[i][j]);
}
printf("\n");
}
}
# include <stdio.h>
# include <math.h>
#include<iostream.h>
#include "stdlib.h"
#include <string.h>
# define N 10 /*矩阵维度*/
void main()
{
int i,j;
double a[N][N];
for(i=1;i<=N;i++) /*初始化矩阵*/
{
for(j=1;j<=N;j++)
{
if(j==i)
a[i][j]=1.5*cos(i+1.2*j);
else
a[i][j]=sin(0.5*i+0.2*j);
printf("%f ",a[i][j]);
}
printf("\n");
}
}