টেট্রাহিড্রন হলো একটি ত্রিভুজাকার قاعدة বিশিষ্ট পিরামিড। এর চারটি মুখ সবই ত্রিভুজ। তিনটি ত্রিভুজ একটি বিন্দুতে মিলিত হয়।

কোড লজিক: math লাইব্রেরির sqrt() এবং pow() ফাংশন ব্যবহার করে বর্গমূল ও বর্গ বের করা হয়। ক্ষেত্রফলের সূত্র: √3 × a²। আয়তনের সূত্র: a³ / (6√2)।
উদাহরণ
#include <stdio.h>
#include <math.h>
int main() {
int a = 5;
float area, volume;
printf("Program to find area and volume of Tetrahedron\n");
printf("The side of Tetrahedron is %d \n", a);
area = (sqrt(3) * (a * a));
printf("The area of Tetrahedron is %f \n", area);
volume = (pow(a, 3) / (6 * sqrt(2)));
printf("The volume of Tetrahedron is %f \n", volume);
return 0;
}
আউটপুট
Program to find area and volume of Tetrahedron The side of Tetrahedron is 5 The area of Tetrahedron is 43.301270 The volume of Tetrahedron is 14.731391