Variables and Input examples in C++ Language Here are some Variables and Input examples in C++ Language Simple Integer Input and Output: #include <iostream>using namespace std;int main() {int number;cout<<"Enter an integer : ";cin>>number;cout<<"You entered : "<<number <<endl;return 0;} • ' int number; ' : Declares a variable named ' number ' to store an integer.• ' cout<< "Enter an integer : "; ' : Asks the user to input an integer.• ' cin>> number; ' : Reads the entered integer from the user.• ' cout << " You entered : " << number << endl; ' : Displays the entered integer. Sum of Two Integers: #include <iostream>using namespace std;int main() {int num1, num2, sum;cout<<"Enter the first integer : " ;cin>> num1;cout<<"Enter the second integer : ";cin>>num2;sum = num1 + num2;cout<<"Sum : " <<sum <<endl;return 0;} • ' int num1, num2, sum; ' : Declares three integer variables to store two input numbers and their sum.• Asks the user to input two integers separately.• Calculates the sum of the entered integers (' sum = num1 + num2; ').• Displays the calculated sum. Check if an Integer is Even or Odd: #include <iostream>using namespace std;int main() {int number;cout<<"Enter an integer : ";cin>> number;if (number % 2 == 0) {cout<<number <<" is even. " <<endl;} else {cout<<number <<" is odd. " <<endl;}return 0;} • Checks if an entered integer is even or odd using the modulo operator ('%').• If the remainder when dividing by 2 is 0, it's even; otherwise, it's odd.• Displays whether the entered numer is even or odd. Average of Three Integers: #include <iostream>using namespace std;int main() {int num1, num2, num3;double average;cout<<"Enter the first integer : ";cin>>num1;cout<<"Enter the second integer : ";cin>>num2;cout<<"Enter the third integer : ";cin>>num3;average = static_cast<double>(num1 + num2 + num3) / 3;cout<<"Average : " <<average <<endl;return 0;} • Adds three integers entered by the user(' num1 ', ' num2 ', ' num3 ').• Calculates the average by dividing the sum by 3, using ' static_cast<double> ' to ensure a decimal result.• Displays the calculated average. Simple String Input and Output: #include <iostream>using namespace std;int main() {string name;cout<<"Enter your name : ";getline(cin, name);cout<<"Hello, " <<name <<" ! " <<endl;return 0;} • ' string name; ' : Declares a variable named ' name ' to store a string.• ' cout<<"Enter your name : "; ' Asks the user to input their name.• ' getline(cin, name); ' : Reads the entered string from the user, including spaces.• ' cout<<"Hello, " <<name <<" ! " <<endl; ' : Displays a greeting using the entered name.