Skip to content

Commit

Permalink
Create recursiveUsalma.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Dedos22 authored Jun 8, 2023
1 parent 95fbc13 commit bbed355
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions recursiveUsalma.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.Scanner;

public class recursiveUsalma {



static void usalma(int taban,int us) {
Scanner scan = new Scanner(System.in);

int result = 1;

for (int i = 1; i <= us; i++) {
result *= taban;
}

System.out.println("Sonuç : " + result);
}


public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int taban,us;
System.out.println("taban:");
taban=scan.nextInt();
System.out.println("us:");
us=scan.nextInt();
usalma(taban,us);



}
}

0 comments on commit bbed355

Please sign in to comment.