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