fork download
  1. #include <stdio.h>
  2. //引数の絶対値を返す関数
  3. int abs(int x){
  4. return (x>0)?x:-x;
  5. }
  6. //引数の二乗を返す関数
  7. int square(int x){
  8. return x*x;
  9. }
  10. //main関数
  11. int main(void) {
  12. int a=1,b=2;
  13. printf("%d",abs(square(a)-square(b)));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
3