Respuesta :
Answer:
Following are the program in C++ Language.
#include <iostream> // header file
using namespace std; // namespace
int main() // main function
{
int pump; // variable declaration
cout<<"Enter the number: ";
cin>>pump;// Read the value by the user
if( (pump >= 1) &&(pump <= 10))// checking condition
pump=pump* 13 ;
if(pump % 2 == 0)// checking condition
cout<<" it is a bad number!";
else
cout<<" out of range value!";
return(0);
}
Output:
Enter the number:4
it is a bad number!
Explanation:
Following are the Description of the following statements.
- Declared a variable "pump" vaiable of int type.
- Read the number by the user by using cin function.
- Check the condition if( (pump >= 1) &&(pump <= 10)) then it executed the if statements block.
- Inside this if there is also one another i.e nested if
- if(pump % 2 == 0) if this statement then it executed the statement inside if otherwise else block will be executed