Hello, since you did not specify a programming language, I wrote this algorithm in C++. Good luck!
<h2>
Code:</h2>
#include <iostream>
#include <vector>
std::vector<int> v;
int main(int argc, char* argv[]) {
while(1) {
int temp;
std::cout << "\nEnter a number: ";std::cin>>temp;
if(temp<0) {
std::cout << "\nEven number(s) is/are:\n---------------------\n";
for(int i=0;i<v.size();i++) {
if(v.at(i)%2==0) std::cout << v[i] << " ";
else continue;
}
std::cout << std::endl;
break;
}else {
v.push_back(temp);
}
}
return 0;
}
Explanation:
Type the correct answer in the box. Spell all words correctly.
Ben has to type a long letter to his friend. What is the correct keying technique that Ben should use?
To prevent strain and key correctly, Ben should use his fingers gently over the keys with his wrist in a flat position.
A Business letter
6ix9ine
Answer:
Explanation:
The following code is written in Java and does exactly what the question asks. The variables are long variables instead of integers because integer variables can only be a maximum of 2147483647 and the product of these two variables is much higher than that.
public static void main(String args[]) {
long x = 50000;
long y = x * x;
System.out.println(y);
}