Learn C++ โ advanced systems, games, and performance programming! โก
C++ is an extension of C with object-oriented programming. Itโs used for games, applications, and high-performance software.
โC++ gives you the power of C with classes, objects, and more.โ
Variables, types, and printing output:
#include <iostream>
using namespace std;
int main() {
int age = 15;
string name = "Dyl";
cout << "Name: " << name << endl;
cout << "Age: " << age << endl;
return 0;
}
Reusable blocks of code:
#include <iostream>
using namespace std;
int add(int a, int b) {
return a + b;
}
int main() {
cout << "Sum: " << add(2,3) << endl;
return 0;
}
Repeating tasks with loops:
#include <iostream>
using namespace std;
int main() {
for(int i=0; i<5; i++) {
cout << "Loop " << i << endl;
}
return 0;
}
Type your C++ code below. This is a **simulated runner**โonly prints lines with cout.
Output will appear here...
*Simulated output (real C++ code requires a compiler)