+ 1
How to make new integer automatically
i want to make a lot of integer but dont want spend times to define integer one by one, so i decided using for, but stuck at some point https://code.sololearn.com/cL8SBmBM7P6L/?ref=app
3 ответов
+ 3
Use array
#include <iostream>
using namespace std;
int main() {
int awo_a[100];
for(int a=0;a<100;a++){
awo_a[a] = a;
}
return 0;
}
+ 2
Try using arrays, you can define an array which can store multiple values of same type.
EDIT:
//here you can store n number of value, all can access by same name and different index.
int array[n];
+ 1
i didnt think about that xd, thank you