Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class sommaRic{
- public static int somma(int m, int n){
- if(n==0){
- System.out.println("Base");
- return m;
- }else {
- System.out.println("Else");
- return somma (m=m+1, n=n-1);
- }
- }
- public static void main (String[] args){
- int m = 3;
- int n = 2;
- int i = 0;
- s = somma(m, n);
- System.out.println (m);
- System.out.println(n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement