ChangeLog update and scope example explained

This commit is contained in:
Mert Gör 🇹🇷 2024-06-30 02:48:08 +03:00
parent c40c2b4ae9
commit cf0dd37025
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2024-06-30 hwpplayer1 <hwpplayer1@debian>
* src/scope_example.cpp: scope example sum of 1 to 10 inclusive is explained
* src/if_statement.cpp: if statement explained/code written
2024-06-24 hwpplayer1 <hwpplayer1@debian>

14
src/scope_example.cpp Normal file
View File

@ -0,0 +1,14 @@
#include <iostream>
int main()
{
int sum = 0;
for (int val = 0; val <= 10; ++val)
sum += val;
std::cout << "Sum of 1 to 10 inclusive is "
<< sum << std::endl;
return 0;
}