
#include <iostream>
using namespace std;

int main()
{
	//// Sequence 
	//// 
	//// Student data
	//int studentID = 15;
	//int studentAge = 23;
	//double studentFee = 75.25;
	//char studentGrade = 'B';

	//// Print variables
	//cout << "Student ID: " << studentID << "\n";
	//cout << "Student Age: " << studentAge << "\n";
	//cout << "Student Fee: " << studentFee << "\n";
	//cout << "Student Grade: " << studentGrade << "\n";
	// 
	//...................................................................//
	// 
	// Selection
	//..............................Example 1...........................//
	// 
	//int age = 20;
	//bool isCitizen = true;

	//if (age >= 18) {
	//	cout << "Old enough to vote.\n";

	//	if (isCitizen) {
	//		cout << "And you are a citizen, so you can vote!\n";
	//	}
	//	else {
	//		cout << "But you must be a citizen to vote.\n";
	//	}
	//}
	//else {
	//	cout << "Not old enough to vote.\n";
	//}
	//..............................Example 2...........................//
	//int day = 4;
	//switch (day) {
	//case 1:
	//	cout << "Monday";
	//	break;
	//case 2:
	//	cout << "Tuesday";
	//	break;
	//case 3:
	//	cout << "Wednesday";
	//	break;
	//case 4:
	//	cout << "Thursday";
	//	break;
	//case 5:
	//	cout << "Friday";
	//	break;
	//case 6:
	//	cout << "Saturday";
	//	break;
	//case 7:
	//	cout << "Sunday";
	//	break;
	//}
	//
	//...................................................................//
	// Iterations
	//..............................Example 1...........................//
	//int number = 2;
	//int i;

	//// Print the multiplication table for the number 2
	//for (i = 1; i <= 10; i++) {
	//	cout << number << " x " << i << " = " << number * i << "\n";
	//}
	// 
	//..............................Example 2...........................//
	//for (int i = 1; i <= 3; i++) {
	//	for (int j = 1; j <= 3; j++) {
	//		cout << i * j << " ";
	//	}
	//	cout << "\n";
	//}
	// 
    //................................Quiz...........................//

	//Write code to print Sum of numbers from 1 to 10 using for loop:


	//int sum = 0;
	//for (int i = 1; i <= 10; i++) {
	//	sum = sum + i;
	//}
	//cout << sum << endl;

	// but what if i want to Solve it without loops ?

	//int num = 10,sum=0;
	//sum = num * (num + 1) / 2;
	//cout << sum;

	//................................Arrays...........................//

	//int myNumbers[5] = { 10, 20, 30, 40, 50 };
	//for (int i = 0; i < 5; i++) {
	//	cout << myNumbers[i] << "\n";
	//}

	// cout << sizeof(myNumbers);  // what is the result ?

	//int getArrayLength = sizeof(myNumbers) / sizeof(myNumbers[0]);
	//cout << getArrayLength;

	// ..............................The best way...........................//

	//int myNumbers[5] = { 10, 20, 30, 40, 50 };
	//for (int num : myNumbers) {
	//	cout << num << "\n";
	//}
	// ..............................2D Arrays...........................//

    //   string letters[2][4] = {
    //     { "A", "B", "C", "D" },
    //     { "E", "F", "G", "H" }
    //   };

	//cout << letters[1][2];  //What is the result ?

	// ..............................references...........................//
    //string food = "Pizza";
    //string& meal = food;

    //cout << food << "\n";  // Outputs Pizza
	//cout << meal << "\n";  // Outputs Pizza


	//meal = "Hamburger";
	//cout << food << "\n";  // Outputs Hamburger

	// ..............................pointers.............................//

    //string food = "Pizza";  // A food variable of type string
    //string* ptr = &food;    // A pointer variable, with the name ptr, that stores the address of food
    //
    //// Output the value of food (Pizza)
    //cout << food << "\n";
    //
    //// Output the memory address of food (0x6dfed4)
    //cout << &food << "\n";
    //
    //// Output the memory address of food with the pointer (0x6dfed4)

    //cout << ptr << "\n";  //what if ( ,& ,* )?

}