Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
const r1 = require('readline');
const r = r1.createInterface({
input: process.stdin,
output: process.stdout
});
/*
r.question('What do you think of Node.js? ', (answer) => {
// TODO: Log the answer in a database
console.log(`Thank you for your valuable feedback: ${answer}`);*/
r.question("Enter a number\n");
r.close();
/*r.question("Enter a number\n");
r.question("Ente another number\n");*/
//var op = r1.question("Choose an operation (+,-,/,*)\n");
//var result;
public class HelloWorld {
public static void main(String []args){
System.out.println("Nama : Jean Baptista Jimmy");
System.out.println("NIM : 17220034");
}
}
userName=input('Please enter your name:')
age=int(input('Please enter your age:'))
factor=2
finalAge=age+factor
multAge=age*factor
divAge=age/factor
print('In', factor, 'years your age will be', finalAge, 'years old', userName)
print('Your age muliply by', factor, 'is', multAge)
print('Your age divided by', factor, 'is', divAge)
class Papa{
protected int x;
Papa(){ x=40;}
Papa(int y){x=y;}
}
public class son extends Papa
{
protected int x=0;
son(){super(15);}
son(int x){ }
public static void main(String []args)
{
son s = new son();
System.out.println(s.x+" ");
Papa t =new son(2);
System.out.println(t.x);
}
}