![]() |
|
Is it possible that you will help me - Printable Version +- BPC Squad Bank Paypal And Cards | Carders Forum | Carding Forum (https://www.bpcforums.biz) +-- Forum: Coders Section (https://www.bpcforums.biz/Forum-coders-section) +--- Forum: C & C++ (https://www.bpcforums.biz/Forum-c-c) +--- Thread: Is it possible that you will help me (/Thread-is-it-possible-that-you-will-help-me) Pages:
1
2
|
Is it possible that you will help me - mahmah - 11-30-2014 hello everyone I want a program that collects odd numbers and even numbersAnd collects even numbers Odd numbers RE: Is it possible that you will help me - atnsquaderr - 11-30-2014 How do you mean collecting even and odd numbers? RE: Is it possible that you will help me - NinZa - 11-30-2014 we dont understand your question? RE: Is it possible that you will help me - mahmah - 12-01-2014 For example, enter 5 digits The program collects individual, including preparation It then collects even numbers and print 2 3 5 1 6 sum odd =9 sum even = 8 RE: Is it possible that you will help me - jamesn - 12-01-2014 Your question is still not very clear it makes no sense? RE: Is it possible that you will help me - mahmah - 12-01-2014 Please help in solving this question For example, enter 5 digits The program collects individual, including preparation It then collects even numbers and print 2 3 5 1 6 sum odd =9 (3+5+1) sum even = 8 ( 2+6 ) RE: Is it possible that you will help me - NinZa - 12-01-2014 Yes its more better now with your explanation What kind function of your program needs? For generator or what? RE: Is it possible that you will help me - Mamusha - 12-11-2014 Yes its more better now with your explanation What kind function of your program needs? For generator or what? RE: Is it possible that you will help me - pddung93 - 12-11-2014 You can do like this: type each number and check odd or even! int main() { unsigned int array[max number]; // max number must be a constant number, ex: array[50] int sum_odd = 0, sum_even = 0; for (int i = 0; i <= 50; i++) { cout << "Type the number " << (i+1) << " : "; cin >> array[i]; if (array[i] % 2 == 0) // if the number you typed is a even number { sum_even += array[i]; // sum_even +=, it means sum_even = sum_even + .... } else sum_odd += array[i]; } return 0; } RE: Is it possible that you will help me - mahmah - 03-05-2015 thanx man < thaaaaaanx very good |