Answer:
I will code in Javascript.
Preconditions:
The variables k, incompletes has been declared and initialized.
The variable nIncompletes contains the number of elements of incompletes.
The variable stududentID has been declared and initialized.
The variable numberOfIncompletes has been declared.
Script:
numberOfIncompletes = 0; <em>//initialize numberOfIncompletes</em>
for( k = 0; k < nIncompletes; k++) {
if(incompletes[k] == studentID){ <em>//if the element of array is equal to studentID</em>
numberOfIncompletes++; <em>//adds 1 to numberOfIncompletes</em>
}
}
Explanation:
The script uses a for loop to go through the entire array incompletes, comparing the k variable with nIncompletes and adding 1 on each pass.
Then inside the for, uses an if statement to compare if the actual element is equal to studentID, if equal adds 1 numberOfIncompletes.
Answer:
test
Explanation:
a test that measures the electrical activity of the heartbeat
If the system cannot boot from the hard drive, then you should boot from the windows set-up dvd
I hope this helps! :)
The answer would be C. Kilobyte
Answer:
There are two ways to print 1 to 1000
- Using Loops.
- Using Recursion.
Explanation:
Using loops
for(int i=1;i<=1000;i++)
{
cout<<i<<" ";
}
Using recursion
Remember you can implement recursion using a function only.
void print(int n)
{
if(n==0)
return;
print(n-1);
cout<<n<<" "';
}
you should pass 1000 as an argument to the function print.