Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Power.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*
* @author Esraa Ramadan
*/

public class Power implements ISubscriber {


public int Power( String input)
{ int base = 2;

int result=1;
for (int i = 0; i < Integer.parseInt(input); i++) {
result *= base;
}
return result;
}
public void notifySubscriber(String input) {
System.out.println(" 2 POWER YOUR NUMBER IS: " + Power(input));

// TODO Auto-generated method stub

}

}