STARTEDORNOT editorial

Practice

Author: Shaikh Shadab
Tester: Rushikesh Thakare
Editorialist: Nilprasad birajdar

DIFFICULTY:

CAKEWALK

PREREQUISITES:

None

PROBLEM:

Given an integer,NN, Perform the following conditions.

  • If NN is odd, print “Programming Started”.
  • If NN is even and in the inclusive range of 22 to 55 , print “programming Not Started”.
  • If NN is even and in the inclusive range of 66 to 2020 , print “Programming Started”.
  • If NN is even and greater than 2020 , print “Programming Not Started”.

SOLUTIONS:

Setter's Solution

#include
using namespace std;

int main() {
int a;
cin>>a;
if(a%2==1)
{
cout<<“programming Started”<<endl;
}
else if(a>=2 && a<=5)
{
cout<<“programming Not Started”<<endl;
}
else if(a>=6 && a<=20)
{
cout<<“programming Started”<<endl;
}
else if(a>20)
{
cout<<“programming Not Started”<<endl;
}
return 0;
}