㈠ c璇瑷姹備笁瑙掑舰鐨勯潰绉
浣跨敤C璇瑷璁$畻涓夎掑舰闈㈢Н鐨勭ず渚嬩唬鐮侊細
c#include<stdio.h>锛#include<math.h>锛宨nt main锛堬級锛宒ouble a锛宐锛宑锛宻锛宎rea銆俻rintf锛堣疯緭鍏ヤ笁瑙掑舰鐨勪笁鏉¤竟鐨勯暱搴︼細 锛夛紱scanf锛%lf%lf%lf锛&a锛&b锛&c锛夛紱s=锛坅+ b+ c锛/2锛沘rea= sqrt锛坰*锛坰- a锛*锛坰- b锛*锛坰- c锛夛級锛沺rintf锛堜笁瑙掑舰鐨勯潰绉涓猴細%.2lf 锛宎rea锛夛紝return0銆
3銆侀潰鍚戣繃绋嬶細C璇瑷鏄闈㈠悜杩囩▼鐨勮瑷锛岃繖璁╃▼搴忕殑閫昏緫缁撴瀯鏇村姞娓呮櫚锛屾槗浜庣悊瑙e拰缁存姢銆傚悓鏃讹紝鐢变簬鍏堕潪闈㈠悜瀵硅薄鐨勭壒鎬э紝C璇瑷鐨勮繍琛屾椂寮閿闈炲父灏忋
4銆佸箍娉涚殑搴旂敤棰嗗煙锛欳璇瑷琚骞挎硾搴旂敤浜庢搷浣滅郴缁熴佸祵鍏ュ紡绯荤粺銆佹父鎴忓紑鍙戙佺郴缁熻蒋浠剁瓑棰嗗煙銆傚畠鏄涓绉嶉潪甯稿疄鐢ㄧ殑缂栫▼璇瑷銆
5銆佸己澶х殑绀惧尯鏀鎸侊細C璇瑷鏈夌潃搴炲ぇ鐨勭敤鎴风兢浣撳拰娲昏穬鐨勭ぞ鍖猴紝浣犲彲浠ユ壘鍒板ぇ閲忕殑寮婧愬簱鍜屽伐鍏锋潵甯鍔╀綘寮鍙慍绋嬪簭銆傝繖澶уぇ鎻愰珮浜嗗紑鍙戞晥鐜囥