카타 8급 Function 2 - squaring an argument

1 C[ | ]

#include <stdint.h>
int32_t square(int32_t n) {
  return n * n;
}
#include <stdint.h>
uint64_t square(int32_t number) {
  return (uint64_t)number * number;
}
#include <stdint.h>
#include <math.h>
int32_t square(int32_t n) {
  return pow(n,2);
}

2 JavaScript[ | ]

var square = function(n) {
  return n * n;
}
var square = function(n) {
  return Math.pow(n, 2);
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}