#include <iostream>
#include <stdio.h>
class CLASS {
private:
int *pointar;
public:
CLASS(int *k){
pointar = k;
}
void move(int j){
*pointar = j;
}
void FREE(){
pointar=nullptr;
}
};
int main() {
int var = 0;
CLASS counter(&var);
while (var < 100) {
counter.move(var + 1);
if (var % 3 == 0 && var % 10 == 3) {printf("%d: Aho!\n", var);}
if (var % 3 != 0 || var % 10 != 3) {printf("%d:\n", var);}
}
printf("これらはvarMod30が3かどうかで求まります\n");
counter.FREE();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: