//1. 写一个函数add,接受两个整数作为参数,返回这两个整数的和.
import java.util.Scanner;
public class Demo1{
public static void main(String[] args){
int a=shuru();
int b=shuru();
int c=add( a, b);
shuchu(c);
}
public static int add(int a,int b){
return a+b;
}
public static int shuru(){
Scanner scan=new Scanner(System.in);
int a;
return a=scan.nextInt();
}
public static void shuchu(int a){
System.out.println(a);
}
import java.util.Scanner;
public class Demo1{
public static void main(String[] args){
int a=shuru();
int b=shuru();
int c=add( a, b);
shuchu(c);
}
public static int add(int a,int b){
return a+b;
}
public static int shuru(){
Scanner scan=new Scanner(System.in);
int a;
return a=scan.nextInt();
}
public static void shuchu(int a){
System.out.println(a);
}
}
//总结,return语句后面不能创建变量如return int a=0;这是不合法的;