কম্পিউটার

C Program for Program একটি বৃত্তের ক্ষেত্রফল বের করতে?


ক্ষেত্রফল হল একটি পরিমাণ যা চিত্রের ব্যাপ্তি দুটি মাত্রায় উপস্থাপন করে। একটি বৃত্তের ক্ষেত্রফল হল একটি দ্বিমাত্রিক সমতলে বৃত্ত দ্বারা আবৃত এলাকা৷

একটি বৃত্তের ক্ষেত্রফল বের করতে, ব্যাসার্ধ[r] বা ব্যাস[d](2* ব্যাসার্ধ) প্রয়োজন৷

ক্ষেত্রফল গণনা করতে ব্যবহৃত সূত্রটি হল (π*r 2 ) বা {(π*d 2 )/4}।

উদাহরণ কোড

ব্যাসার্ধ ব্যবহার করে একটি বৃত্তের ক্ষেত্রফল বের করতে।

#include <stdio.h>
int main(void) {
   float pie = 3.14;
   int radius = 6;
   printf("The radius of the circle is %d \n" , radius);
   float area = (float)(pie* radius * radius);
   printf("The area of the given circle is %f", area);
   return 0;
}

আউটপুট

The radius of the circle is 6
The area of the given circle is 113.040001

উদাহরণ কোড

math.h লাইব্রেরি ব্যবহার করে ব্যাসার্ধ ব্যবহার করে একটি বৃত্তের ক্ষেত্রফল বের করতে। প্রদত্ত সংখ্যার বর্গ বের করতে এটি গণিত শ্রেণীর pow ফাংশন ব্যবহার করে।

#include <stdio.h>
int main(void) {
   float pie = 3.14;
   int radius = 6;
   printf("The radius of the circle is %d \n" , radius);
   float area = (float)(pie* (pow(radius,2)));
   printf("The area of the given circle is %f", area);
   return 0;
}

আউটপুট

The radius of the circle is 6
The area of the given circle is 113.040001

উদাহরণ কোড

ব্যাস ব্যবহার করে একটি বৃত্তের ক্ষেত্রফল বের করতে।

#include <stdio.h>
int main(void) {
   float pie = 3.14;
   int Diameter = 12;
   printf("The Diameter of the circle is %d \n" , Diameter);
   float area = (float)((pie* Diameter * Diameter)/4);
   printf("The area of the given circle is %f", area);
   return 0;
}

আউটপুট

The Diameter of the circle is 12
The area of the given circle is 113.040001

  1. C++ ব্যবহার করে উপবৃত্তের ক্ষেত্রফল বের করার জন্য প্রোগ্রাম

  2. একটি সমান্তরালগ্রামের ক্ষেত্রফল খুঁজে বের করতে জাভা প্রোগ্রাম

  3. একটি বৃত্তের পরিধি খুঁজে পেতে জাভা প্রোগ্রাম

  4. জাভা প্রোগ্রাম একটি ট্রাপিজিয়াম এর এলাকা খুঁজে বের করতে