Let's say I have a project from a client that requires using multiple languages for a few of logic. For example:
How can I build the addition function in C++, Java, JavaScript, and Python?
Answer Format:
C++
#include <iostream>int add(int a, int b) { // Implementation}
Java
public class NewClass { public static int add(int a, int b) { // implementation }}
JavaScript
function add(a, b) { // Implementation}
Python
def add(a, b): # Implementation
Is it illegal to ask with this style? What is the best practice?