Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Обучение {
- public static void main(String[] args) {
- int e, result;
- for(int i=0;i<10;i++) {
- result=1;
- e=i;
- while (e>0){
- result *=2;
- e--;
- }
- System.out.println("2 в степени "+i+" равно "+result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement