Question: Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing the value of a counting variable by a
Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing the value of a counting variable by a factor of two in each cycle.
Step by Step Solution
3.33 Rating (156 Votes )
There are 3 Steps involved in it
int a 1 for int i1 i 10 i Systemoutprintlna if i2 0 a else a loop will decrement t... View full answer
Get step-by-step solutions from verified subject matter experts
