i'm a beginner.

what's wrong?????

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;
int tree_0[65535],tmp[65535];
int main(){
	int last=2;
	int debug2=2;
	for(int i=3;i<=7;i++){
		for(int j=1;j<=last*2;j++){
			tree_0[j+i]=debug2;
			cout <<tree_0[j+i]<<" ";
			debug2++;
		}
		cout <<endl;
		last*=2;
	}
	return 0;
}
closed account (48T7M4Gy)
The best way to get help is:
1. Describe the problem.
2. What does the program do?
3. What output do you get?
4 What output did you expect?
5. Why wasn't the output acceptable?

It doesn't have to be a long explanation but it helps to help you.

Otherwise it is really just a mindreading exercise.

At the moment your program spits out lines of numbers. Lots of programs do that. :(
Last edited on
Topic archived. No new replies allowed.