First practice code with comments:
#include <iostream> //Initializes utilities
using namespace std;
int main() { //Initializes main function
int n = 10; //Initializes integer type variable "n" with value=10
while (n>=10) { //Starts a loop that continues if the value of variable "n" is greater than or equal to 10
if(n>5) { //Begins the following code if the value of variable "n" is greater than 5
cout<<"n is "<<n<<endl;
} else {
cout<<"n = "<<n<<endl;
n--;
}
return 0;
}