Generation

translateFri, 05 May 2023

Eleve al cuadrado un número si es par y al cubo si es impar

int func(int n) { return (n%2==0)? n*n : n*n*n; }

Questions about programming?Chat with your personal AI assistant