CTS Company Numerical Ability Age Problem

The total number of numbers that are divisible by 2 or 3 between 100 and 200(inclusive) are

Read Solution (Total 4)

CTS Other Question

1. Create a method GetMax() with two integer (int) parameters, that returns maximal of the two numbers. Write a program that reads three numbers from the console and prints the biggest of them. Use the GetMax() method you just created. Write a test program that validates that the methods works correctly. Note: This is not a recursive method.

2. write a program that contains a method that reads a string, reverses it and prints it to the console. for example: "introduction" -> "noitcudortni." note: this is not a recursive method.

3. Write a program to generate and print all combinations with duplicates of k elements from a set with n elements. Sample input:
N=3
K=2
A man decided to cover a distance of 80km in 8 hrs. He can walk at a speed of 6 km/hr and cycle at 8 km/hr successively. How long will he walk and how long will he cycle ?