This commit is contained in:
2025-07-02 00:07:49 -07:00
commit c208c6b35d
114 changed files with 71862 additions and 0 deletions

10
cpp/arrays.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <iostream>
using namespace std;
int main() {
int numbers[] = {2,4,8,16};
for (int number : numbers) {
cout << number << endl;
}
return 0;
}

17
cpp/print.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <iostream>
#include <string>
using namespace std;
int main() {
int x;
string y = "this is stored as a string";
cout << "enter 1 to start: ";
cin >> x;
if (x = 1) {
for (float n = 0; n < 10; n += 0.000000001) {
cout << n << " " << endl;
}
}
return 0;
}

19
cpp/structs.cpp Normal file
View File

@ -0,0 +1,19 @@
#include <iostream>
#include <string>
using namespace std;
struct dog {
int age;
int weight;
string color;
string name;
};
int main() {
dog atlas;
atlas.age = 7;
atlas.weight = 77;
atlas.color = "black";
atlas.name = "Atlas";
cout << atlas.color << endl;
}