j_U1p6.java

class prog6{ public static void main(String args[]){ int a=1024; int i=1; int b=0; while(b<a) { b=1<<i; System.out.println(b); i++; } } }

1 Response

How can I write this program by using for loop and bitwise operator

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.