Answer:
See the code below and the algorithm explanation on the figure.
Explanation:
The explanation in order to get the answer is given on the figure below.
Solving this problem with C. The program is given below:
#include <stdio.h>
int main(void) {
int n, Even=0, Odd=0, Zeros=0;
for (;;) {
printf("\nEnter the value the value that you want to check(remember just integers): ");
//IF we input a non-numeric character the code end;
if (scanf("%d", &n) != 1) break;
if (n == 0) {
Zeros++;
}
else {
if (n % 2) {
Even++;
}
else {
Odd++;
}
}
}
printf("for this case we have %d even, %d odd, and %d zero values.", Even, Odd, Zeros);
return 0;
}
Answer:
Deleting files and etc on your computer.
Answer:
MAY BE A
Explanation:
I THINK A IS THE CORRECT ANSWER
// making the class
class Counter {
int counter;
int limit;
// Constructor
Counter(int a, int b){
counter = a;
limit = b;
}
// static function to increment
static increment(){
if(counter<limit)
nCounter+=1;
}
// Decrement function
void decrement(){
if(counter>0)
nCounter-=1;
}
int getValue(){
return counter;
}
static int nCounter;
int getNCounters(){
return nCounter;
}
};
// Initializa the static
int Counter::nCounter = 0;