This is the very first post on my blog. I’ve built this site using Astro, a modern web framework that makes building fast websites easy.
Astro is great because:
Here’s a small C++ “Hello World” you can try locally:
#include <iostream>
int main() {
std::cout << "Hello, world!\n";
return 0;
}
Compile and run:
g++ -std=c++17 hello.cpp -o hello
./hello
Stay tuned for more updates!
An arithmetic progression is a sequence where each term differs from the previous by a constant d, called the common difference.
The n-th term is:
an=a1+(n−1)dThe sum of the first n terms is:
Sn=2n(2a1+(n−1)d)=2n(a1+an)For example, the AP 2,5,8,11,… has a1=2 and d=3, so its 10th term is a10=2+9×3=29 and the sum of the first 10 terms is S10=210(2+29)=155.