Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
Python
JavaScript
Java
C++
age = 15 print('Age: ' + str(age)) if age < 13: print('You are a child') elif age < 20: print('You are a teenager') else: print('You are an adult') #Python
const age = 15; console.log('Age: ' + age); if (age < 13) { console.log('You are a child'); } else if (age < 20) { console.log('You are a teenager'); } else { console.log('You are an adult'); } //JavaScript
public class Main { public static void main(String[] args) { int age = 15; System.out.println("Age: " + age); if (age < 13) { System.out.println("You are a child"); } else if (age < 20) { System.out.println("You are a teenager"); } else { System.out.println("You are an adult"); } } } //Java
#include
#include
using namespace std; int main() { int age = 15; cout << "Age: " + to_string(age) + "\n"; if (age < 13) { cout << "You are a child"; } else if (age < 20) { cout << "You are a teenager"; } else { cout << "You are an adult"; } return 0; } //C++
Python result:
JavaScript result:
Java result:
CPP result:
Age: 15
You are a teenager
Age: 15
You are a teenager
Age: 15
You are a teenager
Age: 15
You are a teenager