解ï¼
1ãæ±æ´æ°ç»å¯¹å¼å¯ä»¥ä½¿ç¨åºå½æ°absï¼int aï¼ï¼è¿åå¼å°±æ¯açç»å¯¹å¼ï¼æ³¨æï¼abså½æ°å¨å¤´æ件mathä¸ã
2ã使ç¨æ¡ä»¶è¡¨è¾¾å¼ä½¿ç¨ï¼a>0?a:a*-1ï¼å°±æ¯å¤æaæ¯å¦å¤§äº0ï¼å¦ææ¯ç´æ¥è¿åaï¼å¦åè¿åaçç¸åæ°ã
åè代ç ï¼
#include<stdio.h>