Engineering Project Coordinator Interview Questions

45,147 engineering project coordinator interview questions shared by candidates

Write a function or method that returns the String representation of numbers from 1 to n. But for multiples of 3, it should output "Foo" instead of the number. For multiples of 5, it should output "Bar" instead of the number. For numbers that are multiples of both 3 and 5, it should output "FooBar" instead of the number. Consider n as the parameter to your function or method. Here are two samples: n=3 Return value=12Foo n=6 Return value=12Foo4Bar6
avatar

Intern - Engineering

Interviewed at H2O.ai

3.1
Sep 6, 2023

Write a function or method that returns the String representation of numbers from 1 to n. But for multiples of 3, it should output "Foo" instead of the number. For multiples of 5, it should output "Bar" instead of the number. For numbers that are multiples of both 3 and 5, it should output "FooBar" instead of the number. Consider n as the parameter to your function or method. Here are two samples: n=3 Return value=12Foo n=6 Return value=12Foo4Bar6

Viewing 1411 - 1420 interview questions

Glassdoor has 45,147 interview questions and reports from Engineering project coordinator interviews. Prepare for your interview. Get hired. Love your job.