Answer:
Explanation:
--> First constraint should be satisfied.
UnitPrice>=22.
--> In Second and third either of one should be satisfied.
CategoryID in (4,7,8) OR (CategoryID in (1,3) AND UnitsInStock >= 40)
--> So, Final statement is :
SELECT ProductID, UnitPrice, CategoryID, UnitsInStock FROM Products
WHERE UnitPrice>=22 AND (CategoryID in (4,7,8) OR (CategoryID in (1,3) AND UnitsInStock >= 40))
*ip+1
ip is a pointer to int
*ip is that int so *ip+1 is the value at ip plus 1
When using the following symbol, there are two arrows coming out of it. One arrow corresponds to what happens in the program if the answer to the question if it is _______YES_____ and the other corresponds to what happens next if the answer to the question is _____NO_____ .
Explanation:
When using the following symbol, there are two arrows coming out of it. One arrow corresponds to what happens in the program if the answer to the question if it is <u>Yes and the other corresponds to what happens next if the answer to the question is No. </u>
The Below symbol(in attachment ) is used to take decisions. This decision taking step is represented as a diamond in a flowchart.
A method of transformation that involves changing the radix or base of the original key and either discarding excess high-order digits (that is, digits in excess of the number desired in the key) or extracting some part of the transformed number.
Answer:
The program in C++ is as follows:
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> nums;
int num;
cin>>num;
while(num != -1){
nums.push_back(num);
cin>>num; }
for (auto i = nums.begin(); i != nums.end(); ++i){
cout << *i <<endl; }
return 0;
}
Explanation:
This declares the vector
vector<int> nums;
This declares an integer variable for each input
int num;
This gets the first input
cin>>num;
This loop is repeated until user enters -1
while(num != -1){
Saves user input into the vector
nums.push_back(num);
Get another input from the user
cin>>num; }
The following iteration print the vector elements
<em> for (auto i = nums.begin(); i != nums.end(); ++i){
</em>
<em> cout << *i <<endl; }
</em>