Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int velicinaPolja = 0;
- for(int i=0;i<=1500;i++) {
- if(i%3==0 || i%7==0) {
- velicinaPolja++;
- }
- }
- int *polje = new int[velicinaPolja];
- int brojacPolja = 0;
- for(int i=0;i<=1500;i++) {
- if(i%3==0 || i%7==0) {
- polje[brojacPolja] = i;
- brojacPolja++;
- }
- }
- for(int i=0;i<velicinaPolja;i++) {
- cout << polje[i] << endl;
- }
- delete [] polje;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement