What are some ways you can work with templates? Check all that apply.
Answer: (A,D,E) see picture below for help also.
Once the pseudocode is accepted by the team, it is rewritten using the vocabulary and syntax of a programming language. The purpose of using pseudocode is an efficient key principle of an algorithm. It is used in planning an algorithm with sketching out the structure of the program before the actual coding takes place.
Answer:
#include<stdio.h>
#include <iostream>
using namespace std;
int main(){
int number, min, max;
cout << "Enter the minimum range: ";
cin >> min;
cout << "Enter the maximum range: ";
cin >> max;
cout << "Odd numbers in given range are: ";
for(number = min; number <= max; number++)
if(number % 2 !=0)
cout << number<< " ";
cout<< "Even numbers in given range are: ";
for(number = min; number <= max; number++)
if(number % 2 ==0)
cout << number << " ";
return 0;
}
Explanation:
First of all, we take declare two variables. one as the lowest number of the range and the other as the upper limit of the range (in this case: <em>min</em> and <em>max</em>). We declare another variable (<em>number</em>) and store in it the lowest number of the range (<em>min</em>). To check whether the number currently stored as the value of the variable (<em>number</em>) is even, we take in account the remainder of that number divided by 2. If the remainder does not equals 0, we print that number as odd. We again check the remainder by dividing the number by 2. If the remainder does equals 0, we print that number as even.