Our website uses necessary cookies to enable basic functions and optional cookies to help us to enhance your user experience. Learn more about our cookie policy by clicking "Learn More".
Accept All Only Necessary Cookies
FooBarQix Kata icon

FooBarQix Kata


Best.App
1.0
  • Aug 31, 2016
    Update date
  • Everyone
  • Android 2.3.4+
    Android OS

About FooBarQix Kata

Algorithm to resolve FooBarQix Kata

During an interview for an internship, they ordered me to resolve this problem

Write a program that prints numbers from 1 to 100, one number per line. For each printed number, use the following rules:

1. if the number is divisible by 3 or contains 3, replace 3 by "Foo";

2. if the number is divisible by 5 or contains 5, replace 5 by "Bar";

3. if the number is devisible by 7 or contains 7, replace 7 by "Qix".

Example: 1 2 FooFoo 4 BarBar Foo QixQix 8 Foo Bar

More details:

- divisors have high precedence, ex: 51 -> FooBar

- the content is analysed in the order they appear, ex: 53 -> BarFoo

- 13 contains 3 so we print "Foo"

- 15 is divisible by 3 and 5 and contains 5, so we print “FooBarBar”

- 33 contains 3 two times and is divisible by 3, so we print “FooFooFoo”

Show More

Additional APP Information

Latest Version

1.0

Uploaded by

Ahmad Harits

Requires Android

Android 2.3.4+

Content Rating

Everyone

What's New in the Latest Version 1.0

Last updated on Aug 31, 2016

Minor bug fixes and improvements. Install or update to the newest version to check it out!

Show More

FooBarQix Kata Screenshots

FooBarQix Kata posterFooBarQix Kata screenshot 1FooBarQix Kata screenshot 2FooBarQix Kata screenshot 3FooBarQix Kata screenshot 4FooBarQix Kata screenshot 5

Related Tags

Popular Articles In Last 24 Hours

Subscribe to APKPure
Be the first to get access to the early release, news, and guides of the best Android games and apps.
No thanks
Sign Up
Subscribed Successfully!
You're now subscribed to APKPure.