Add iostream and initialization

This commit is contained in:
2026-04-04 22:33:20 -05:00
parent 13c53e6181
commit 703fa75e7e
6 changed files with 52 additions and 1 deletions

16
ch_1/iostream/main.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include <iostream>
int main() {
std::cout << "Hello, world!\n";
double pi { 3.1415 };
std::cout << "pi is approximately " << pi << std::endl;
std::cout << "Enter a character: ";
char c { };
std::cin >> c;
std::cout << "You entered " << c << "\n";
return 0;
}