float base, height, Area; /*ชนิดของข้อมูล*/ printf("please input base:"); /*ใส่ความกว้างของฐานรูปสามเหลี่ยม*/ scanf("%d",&base); printf("please input height:"); /*ใส่ความสูงของรูปสามเหลี่ยม*/ scanf("%d",&height); Area = 0.5 * base * height; /*สูตรการหาพื้นที่สามเหลี่ยม*/ printf("so, 0.5 * %d * %d = %d",0.5,base,height,Area); getch();
Posted on: Thu, 11 Jul 2013 02:13:52 +0000
Trending Topics
Recently Viewed Topics
© 2015