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);
}
JavaScript
var square = function(n) {
return n * n;
}
var square = function(n) {
return Math.pow(n, 2);
}