Array Manipulation
Hope you can help me!
THANK YOU!!!
I'm really fond of even numbers, you know? That's why I'll be letting you make another even
number problem yet again. This time, you need to print from a range of two inputted numbers,
n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order
Input
1. An integer
Output
Enter·n:·5
*****
#include <iostream>
using namespace std;
int main(void) {
int n;
cout << "Enter n: ";
cin >> n;
simple(&n);
cout << n;
return 0;
}
Input
1. First integer
2. Second integer
Output
Enter·integer·1:·10
Enter·integer·2:·20
20·110
#include <iostream>
using namespace std;
int main(void) {
int a, b;
cout << "Enter integer 1: ";
cin >> a;
cout << "Enter integer 2: ";
cin >> b;
exchangeGift(&a, &b);
cout << a << " " << b;
return 0;
}
Instructions:
Output
My·destiny·=·11
#include <iostream>
using namespace std;
int main(void) {
int destiny = 22;
int *ptr1, *ptr2, *ptr3;
// TODOFill in the blank
ptr1 = ;
ptr2 = ptr1;
ptr3 = ptr2;
cout << "My destiny = " << *ptr3;
return 0;
}
Compute the total quiz and average quiz of three (3) scores. Determine if the average score is greater than or equal to 70, if TRUE , display Remarks is “ PASSED” otherwise display “FAILED”.
Write a program that will be able to classify fruits based on their (1) shape, (2) color and (3) texture. We have the following assumptions:
shape can assume any of the two values, namely: 0 to represent a round shape, 1 to represent an oblong shape
color can assume any of the three values, namely: 0 to represent a green color, 1 to represent a yellow color, 2 to represent a red color, and 3 to represent an orange color
texture can assume any of the two values, namely: 0 to represent smooth texture and 1 to represent a rough texture
2. The program should be able to determine the following fruits with the following characteristics:
apple: round shape, red color, smooth texture
banana: oblong shape, yellow color or green color, smooth texture
orange: round shape, orange color, smooth texture
jackfruit: oblong shape, green color, rough texture
Q ⊂ R+
a. true
b. false
Create a class Zero, write a function called zero_small) that has two integer arguments being passed by reference and sets the smaller of the two numbers to 0.
Runtime input:
23
6
Output:
23
Create a class Zero, write a function called zero_small) that has two integer arguments being passed by reference and sets the smaller of the two numbers to 0.
Runtime input:
23
6
Output:
23