I’m pretty sure is false as well because of the first person has told u <3
Answer:
#include <iostream>
using namespace std;
int main() {
int num, check=0;
for(int num = 1; num<=100;num++){
for(int i = 2; i <= num/2; i++) {
if(num % i == 0)
{
check=1;
break; } }
if (check==0) { cout <<num<<" "; }
check = 0;
}
return 0;
}
Explanation:
This line declares num as integer which represents digits 1 to 100.
A check variable is declared as integer and initialized to 0
<em> int num, m=0, check=0;
</em>
This for loop iterates from 1 to 100
for(int num = 1; num<=100;num++){
This iterates from 2 to half of current digit
for(int i = 2; i <= num/2; i++) {
This checks for possible divisors
if(num % i == 0)
{
If found, the check variable is updated to 1
check=1;
And the loop is terminated
break; } }
The following if statement prints the prime numbers
if (check==0) { cout <<num<<" "; }
check = 0;
}
Hi there! Hopefully this helps!
------------------------------------------------------------------------------------------------------
1. Barbara Liskov.
2. Carl Sassenrath.
3. Larry Page.
Answer:
The answer is "Option 2"
Explanation:
In the given question the answer is "array bounds checking", It Checks the limits by providing a way, that Specifies whether a value is inside those limits has been used. It is a variable, that falls into a given class or function called as an array index of array, that's why all option are wrong, that is explained as follows:
- In option 1, It uses provides security, that's why it is wrong.
- In option 3, It works on the bits, that's why it is not correct.
- In option 4, It uses two thing that is "array bound checks and sub-script of bond", that's why it is wrong.