#include <stdio.h>
int main() {
int age = 19;
float height = 181.2;
double weight = 62.4; // น้ำหนักในหน่วยกิโลกรัม
double height_in_meters = height / 100; // แปลงส่วนสูงจากเซนติเมตรเป็นเมตร
double bmi = weight / (height_in_meters * height_in_meters); // คำนวณ BMI
char name[] = "Suttawee";
char surname[] = "Ritsamak";
char studentID[] = "6710210355";
double num1 = 3.14, num2 = 1.50;
double sum = num1 * num2; // คำนวณ num1 คูณ num2
double radius = 6.2374; // กำหนดค่ารัศมี
double area;
double circumference; // ประกาศตัวแปรสำหรับเก็บค่าเส้นรอบวง
area = 3.14159 * radius * radius;
circumference = 2 * 3.14159 * radius;
printf("Age: %d years\n", age
); // แสดง Age printf("Height: %.1f cm\n", height
); // แสดง Height printf("BMI: %.2f\n", bmi
); // แสดงค่า BMI ด้วยทศนิยม 2 ตำแหน่ง printf("Name: %s\n", name
); // แสดง Name printf("Surname: %s\n", surname
); // แสดง surname printf("Student ID: %s\n", studentID
); // แสดง student ID printf("Sum: %.3f\n", sum
); // แสดงผลด้วยทศนิยม 3 ตำแหน่ง printf("Radius: %.4f\n", radius
); printf("Circumference: %.4f\n", circumference
); return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkgewoKICAgIGludCBhZ2UgPSAxOTsKICAgIGZsb2F0IGhlaWdodCA9IDE4MS4yOwogICAgZG91YmxlIHdlaWdodCA9IDYyLjQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDguJnguYnguLPguKvguJnguLHguIHguYPguJnguKvguJnguYjguKfguKLguIHguLTguYLguKXguIHguKPguLHguKEKICAgIGRvdWJsZSBoZWlnaHRfaW5fbWV0ZXJzID0gaGVpZ2h0IC8gMTAwOyAgICAgICAgICAgICAgICAgICAgICAgLy8g4LmB4Lib4Lil4LiH4Liq4LmI4Lin4LiZ4Liq4Li54LiH4LiI4Liy4LiB4LmA4LiL4LiZ4LiV4Li04LmA4Lih4LiV4Lij4LmA4Lib4L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