Pergunta de entrevista da empresa ProModel

Write a numeric array where any number devisable by three returns "Pro", divisible by 5 returns "Model", and divisible by three and five returns "ProModel"

Respostas da entrevista

Sigiloso

31 de ago. de 2018

I was so flustered (IT's A DATA JOB, NOT A JAVASCRIPT JOB) that I did a pretty poor job in answering.

Sigiloso

23 de mai. de 2019

This is a variation on the fizzbuzz question. public class Test { public static void main(String[] args) { String buzz = "buzz", fizz = "fizz"; //initialise the string variables for (int i = 1; i <= 100; i++) { if (i % 15 == 0) //check if number in position i is divisable by 15, if so don't check other 2 conditions - we don't want a double print { System.out.println(buzz + fizz + " " + i)); } else if (i % 3 == 0 ) { System.out.println(buzz + " " + i); } else if (i % 5== 0) { System.out.println(fizz + " "+ i); } } } }