9.4 CONDITIONAL STATEMENTS

9.4 চৰ্তসাপেক্ষ বিবৃতি

Till now have written program where every statement in the main() function executes. They are executed in the order they appear in the code and they are executed only once. But many times, the problem we are give to solve is not that simple.

এতিয়ালৈকে লিখিত কাৰ্যসূচী আছে য’ত মুখ্য() ফাংচনৰ প্ৰতিটো বিবৃতি কাৰ্যকৰী হয়। তেওঁলোকক কোডত দেখুওৱা ক্ৰমত কাৰ্যকৰী কৰা হয় আৰু তেওঁলোকক কেৱল এবাৰহে কাৰ্যকৰী কৰা হয়। কিন্তু বহুসময়ত, আমি সমাধান কৰিবলৈ দিয়া সমস্যাটো ইমান সৰল নহয়।

The solution of the problem may require to execute only a set of statements depending on some logical test. This is called branching. Moreover, a statement might require to be executed more than once. This is called looping. We now see addressing such scenarios in C programing.

সমস্যাটোৰ সমাধানৰ বাবে কিছুমান যৌক্তিক পৰীক্ষাৰ ওপৰত নিৰ্ভৰ কৰি কেৱল বিবৃতিৰ এটা সংহতি কাৰ্যকৰী কৰিব লাগিব পাৰে। ইয়াক শাখা বুলি কোৱা হয়। তদুপৰি, এটা বিবৃতি একাধিকবাৰ কাৰ্যকৰী কৰিব লাগিব পাৰে। ইয়াক লুপিং বুলি কোৱা হয়। আমি এতিয়া চি প্ৰগ্ৰামিংত এনে পৰিস্থিতিবোৰ সম্বোধন কৰা দেখিছোঁ।

Example 9.4: A C program to compare two numbers using if statement