简单的JAVA,有分哦

来源:百度知道 编辑:UC知道 时间:2024/05/14 01:50:46
import java.lang.*;
import java.io.*;

class Ownin //自定义输入类
{
Ownin()
{;
}
public static String op()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s;
System.out.flush();
s=br.readLine();
return s;
}
public static int intValue() throws IOException//输入整数
{
String s=op();
int a=Integer.parseInt(s);
return a;
}
public static float floatValue()throws IOException//输入浮点数
{
String s=op();
float a=Float.parseFloat(s);
return a;
}
}

class NOT //模拟非逻辑门
{
int in,out;
NOT()
{
;
}
int run(int IN)
{
in=IN;
if(in==1)
{
out=0;
}
else
{
out=1;
}
return out;
}
}

public class Test //测试NOT类<

import java.io.*;

class Ownin // 自定义输入类
{
Ownin() {
}

public static String op() throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
System.out.flush();
s = br.readLine();
return s;
}

public static int intValue() throws IOException// 输入整数
{
String s = op();
int a = Integer.parseInt(s);
return a;
}

public static float floatValue() throws IOException// 输入浮点数
{
String s = op();
float a = Float.parseFloat(s);
return a;
}
}

class NOT // 模拟非逻辑门
{
int in, out;

NOT() {
;
}

int run(int IN) {
in = IN;
if (in == 1) {
out = 0;
} else {
out = 1;
}
return out;
}
}

public class Test // 测试NOT类
{
public static void main(String argv[])