一、
public class wqw { /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double i=9;
double j=0;
System.out.println(j%i);
}}
结果0.0
二、
public class wqw { /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double i=9;
double j=0;
System.out.println(i%j);
}}
结果NaN
public class wqw { /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double i=9;
double j=0;
System.out.println(j%i);
}}
结果0.0
二、
public class wqw { /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double i=9;
double j=0;
System.out.println(i%j);
}}
结果NaN
解决方案 »
- 请牛人帮忙
- ArrayList 不能转成 Collection
- 我初学swing,有这么几个不懂的地方,请教大家:
- java网络编程的一个问题
- 如果字符串中有回车符,如何将回车符替换成成字符串"\n"?
- 为什么run中的线程没有打印
- 真急人,还运行不了“HelloWorld"?出现java.lang.NoClassDefFoundError!
- JAVA的高手高手高高手,JavaTM Mobile Information Device Profile (MIDP) 1.0.3是如何在98中安装的?????
- 求助JTextArea控件对行数的控制办法!!!
- 如何解决jbuilder4执行程序时出现中文输入条的问题?谢谢!
- GUI中如何实现在一个匿名内部类中跳转页面
- java程序
#include <stdio.h>
int main()
{
double d = 9;
double b = 0;
double rst = d%b;
printf("%f", d%b);
return 0;
}
--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.cpp
test.cpp(6) : error C2296: '%' : illegal, left operand has type 'double'
test.cpp(6) : error C2297: '%' : illegal, right operand has type 'double'
test.cpp(7) : error C2296: '%' : illegal, left operand has type 'double'
test.cpp(7) : error C2297: '%' : illegal, right operand has type 'double'
Error executing cl.exe.test.obj - 4 error(s), 0 warning(s)