Respuesta :
do
ask for input
while input less that 5 or more than 20
set total to 0
loop input times
get temp
add temp to total
end loop
output total/input
ask for input
while input less that 5 or more than 20
set total to 0
loop input times
get temp
add temp to total
end loop
output total/input
Following are the pseudo-code and program to the given question:
Pseudo-code steps:
- start.
- Declaring integer variable.
- Input number.
- Defining a loop that checks the input number is in between 5 to 20.
- If the number is not in range input number.
- Outside the loop, print the matched value.
- stop.
Program:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int n;//defining an integer variable
cout <<"Enter a number in the range of (5-20): " ;//print message
cin>>n;//input number
while(n<=5||n>=15)//defining loop that check the input value range
{
cout<<"Enter a number in the range of (5-20): ";//print message
cin>>n;//input number
}
cout<<"Your number is: "<<n<<endl;//print number
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/1319833
