Answer:
The program in C++ is as follows:
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> intVect;
int n;
cin>>n;
int intInp;
for (int i = 0; i < n; i++) {
cin >> intInp;
intVect.push_back(intInp); }
for (int i = n-1; i >=0; i--) { cout << intVect[i] << " "; }
return 0;
}
Explanation:
This declares the vector
vector<int> intVect;
This declares n as integer; which represents the number of inputs
int n;
This gets input for n
cin>>n;
This declares intInp as integer; it is used to get input to the vector
int intInp;
This iterates from 0 to n-1
for (int i = 0; i < n; i++) {
This gets each input
cin >> intInp;
This passes the input to the vector
intVect.push_back(intInp); }
This iterates from n - 1 to 0; i.e. in reverse and printe the vector elements in reverse
for (int i = n-1; i >=0; i--) { cout << intVect[i] << " "; }
Answer:
the answer would be there
Explanation:
Income inequality and Digital literacy prevents many people from having access to technology and the Internet.
<h3> How does digital system affect people's lives?</h3>
People do not have access to internet because of poor economic and social problems, such as fewer job opportunities, less competitive economies and others.
Other Factors such as digital literacy and low income levels, geographical restrictions, lack of zeal to use technology are known to have contributed to the digital division in the country.
Learn more about Income inequality from
brainly.com/question/24554155
Answer:
Testing
Explanation:
From the question, we understand that Carlos just finished the coding of the app.
In software development life cycle, the coding phase is where Carlos is expected to make use of his choice of programming language to design the app;
This stage is an integral part of the implementation process and according to the question, the coding has been completed;
The next phase or stage after the implementation phase is testing.
Hence, Carlos is getting ready to test the app.
Answer:
(a) What is the best case time complexity of the algorithm (assuming n > 1)?
Answer: O(1)
(b) What is the worst case time complexity of the algorithm?
Answer: O(n^4)
Explanation:
(a) In the best case, the if condition will be true, the program will only run once and return so complexity of the algorithm is O(1)
.
(b) In the worst case, the program will run n^4 times so complexity of the algorithm is O(n^4).