Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int number;
- cout << "How many numbers do you want to accept?" << endl;
- cin >> number;
- cout << "Ok, one moment please!" << endl;
- int arr[number];
- int sum = 0;
- cout << "Please enter the numbers!" << endl;
- for(int numbers = 0; numbers < 3; numbers++)
- {
- cin >> arr[numbers];
- sum = sum + arr[numbers];
- }
- if(sum%2==0)
- {
- cout << "The sum is EVEN" << endl;
- }else{
- cout << "The sum is ODD" << endl;
- }
- cout << "Bye, bye!" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement