init
This commit is contained in:
commit
3d8100ef37
6
hello_world.cpp
Normal file
6
hello_world.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
// This is a comment
|
||||
int main() {
|
||||
std::cout << "Hello World!";
|
||||
}
|
BIN
input_output
Executable file
BIN
input_output
Executable file
Binary file not shown.
16
input_output.cpp
Normal file
16
input_output.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string name;
|
||||
string age;
|
||||
|
||||
cout << "What's your name?";
|
||||
cin >> name;
|
||||
|
||||
cout << "How old are you?";
|
||||
cin >> age;
|
||||
|
||||
cout << "Hi, my name is " << name << ", and I am " << age << " years old.";
|
||||
}
|
BIN
vars_pointers
Executable file
BIN
vars_pointers
Executable file
Binary file not shown.
21
vars_pointers.cpp
Normal file
21
vars_pointers.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
float myFloat;
|
||||
myFloat = 25 / 2;
|
||||
|
||||
bool isGameOver = true;
|
||||
|
||||
char character = '#';
|
||||
character = '!';
|
||||
|
||||
int counter = 1;
|
||||
int *count;
|
||||
|
||||
count = &counter;
|
||||
|
||||
cout << "Value: " << *count << "\n";
|
||||
cout << "Memory Address: " << count;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user