有关scanf()函数的问题(三)
编个程序对float型 a[3][4]二维数组输入12个数再把它输出
哈哈 简单吧!
本人编写如下
main()
{
int i,j;
float a[3][4];
for(i=0; i<3; i++)
for(j=0; j<4; j++)
scanf("%f",&a[i][j]);
printf("The a[3][4] is:\n");
for(i=0; i<3; i++)
{
for(j=0; j<4; j++)
printf("%f ",a[i][j]);
printf("\n");
}
getch();
}
无warning 无error
但结果显示是:
scanf: floating point format not linked
Abnormal program termination
敬请诸位高手指教!
注: 本人系统Win2000 软件Tc2.0
哈哈 简单吧!
本人编写如下
main()
{
int i,j;
float a[3][4];
for(i=0; i<3; i++)
for(j=0; j<4; j++)
scanf("%f",&a[i][j]);
printf("The a[3][4] is:\n");
for(i=0; i<3; i++)
{
for(j=0; j<4; j++)
printf("%f ",a[i][j]);
printf("\n");
}
getch();
}
无warning 无error
但结果显示是:
scanf: floating point format not linked
Abnormal program termination
敬请诸位高手指教!
注: 本人系统Win2000 软件Tc2.0
...全文
相关推荐
scanf(), getchar(), 以及gets()函数注意点
对函数scanf()、getchar()、gets()的异同进行深入剖析
scanf()函数释疑
scanf()函数应当是C学习者能熟练运用的一个函数,但有很多初学者对此函数不能很好的运用,在实际编程中错误使用scanf()函数,本文结合笔者在编程实践中及论坛上网友所遇到的问题作一释疑~
C语言scanf用法及有用技巧
中山大学牛人总结的scanf函数的技巧,看了之后对scanf函数理解会更加深刻。
C语言中scanf函数的使用——C语言教法点滴.pdf
C语言中scanf函数的使用——C语言教法点滴.pdf
scanf的用法
SCANF 函数 使用方法


