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