- 7
1,2,4,8,16,32,64 . use for loop to generate this number
is a question in java i find hard to understand anything about
4 Respuestas
+ 6
// if n = 100 (upper limit)
int n = 100;
for(int i = 1; i <= n; i*=2) {
System.out.print(i+" ");
}
0
God bless u guys!!!!
0
#include <stdio.h>
int main()
{
for(int i=1; i<=64; i*=2)
{
printf("%d\t",i);
}
return 0;
}
0
1,2,4,8,16,32,64 . use for loop to generate this number