find output of the given
Attachments:
Answers
Answered by
1
Answer:
I guess this is what you want
output:
4
8
16
32
64
128
256
512
1024
2048
public class Text {
public static void main(String[] args) {
int i,n=2,pwr=2;
for(i=1;i<=10;i++ ) {pwr*=2;
System.out.println(pwr);
}
}
}
Remarks: Please insert the semicolons.
Similar questions
Chemistry,
1 day ago
Chemistry,
2 days ago
Social Sciences,
2 days ago
Math,
8 months ago
Geography,
8 months ago