fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b,c,x;
  6. scanf("%d %d",&x,&a);
  7. b=x*a;
  8. c=2*a+2*x;
  9. printf("面積=%d 周の長さ=%d",b,c);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0.01s 5316KB
stdin
2 3
stdout
面積=6 周の長さ=10