Relative Content

Tag Archive for c++visual-c++

Reading unknown number of three integers, and printing one of the first 2 integers that has more digits (equal to the third int) on the even pos

Write a program that will read unknown number of three integers, and for each triple (a, b, c) will print the number (a or b) that contains the digit c more times on even positions (the positions are counted from right to left, and the first position is 1).
Here’s my try (it gives me a time limit exceeded error, it’s a problem with the function find):

Reading unknown number of three integers, and printing one of the first 2 integers that has more digits (equal to the third int) on the even pos

Write a program that will read unknown number of three integers, and for each triple (a, b, c) will print the number (a or b) that contains the digit c more times on even positions (the positions are counted from right to left, and the first position is 1).
Here’s my try (it gives me a time limit exceeded error, it’s a problem with the function find):

Reading unknown number of three integers, and printing one of the first 2 integers that has more digits (equal to the third int) on the even pos

Write a program that will read unknown number of three integers, and for each triple (a, b, c) will print the number (a or b) that contains the digit c more times on even positions (the positions are counted from right to left, and the first position is 1).
Here’s my try (it gives me a time limit exceeded error, it’s a problem with the function find):