6.5.3 Finding all the even numbers from a series of numbers,

6.5.3 সংখ্যাৰ এটা শৃংখলাৰ পৰা সকলো সমান সংখ্যা বিচাৰি উলিওৱা,

We fist need to store the element into an array and thus and thus Steps 1 and 2 remain the same. We need to put the even numbers in Step 3.

আমি মুঠি মাৰি উপাদানটো এটা এৰেত সংৰক্ষণ কৰিব লাগিব আৰু এনেদৰে পদক্ষেপ 1 আৰু 2 একে থাকিব লাগিব। আমি সমান সংখ্যাবোৰ পদক্ষেপ ৩ ত ৰাখিব লাগিব।

We will run through the array elements and for every element, we will check whether the element is divisible by 2 or not. If it is divisible by 2, it is an even number. The pseudocode for this step is presented below.

আমি এৰে উপাদানবোৰৰ মাজেৰে চলিম আৰু প্ৰতিটো উপাদানৰ বাবে, আমি পৰীক্ষা কৰিম যে উপাদানটো 2 ৰ দ্বাৰা বিভাজ্য হয় নে নহয়। যদি ই 2 ৰ দ্বাৰা বিভাজ্য হয়, ই এক সমান সংখ্যা। এই পদক্ষেপৰ বাবে ছদ্মকোডতলত উপস্থাপন কৰা হৈছে।

In the above code segment, we check the divisibility with the help of a remainder operator (%). When we divide a number by 2 and the remainder is zero, it is an even number. Here, double equal to (==) operator is used for the comparison.

ওপৰোক্ত কোড শাখাত, আমি অৱশিষ্ট অপাৰেটৰৰ (%) সহায়ত বিভাজ্যতা পৰীক্ষা কৰোঁ। যেতিয়া আমি এটা সংখ্যাক 2 ৰে হৰণ কৰোঁ আৰু বাকীখিনি শূন্য হয়, ই এক সমান সংখ্যা। ইয়াত, তুলনাৰ বাবে (=) অপাৰেটৰৰ দুগুণ সমান ব্যৱহাৰ কৰা হয়।

The complete C program is shown using Example 6.5.

সম্পূৰ্ণ চি প্ৰ’গ্ৰামটো উদাহৰণ 6.5 ব্যৱহাৰ কৰি দেখুওৱা হৈছে।