Paste
Copy
Cut
Options

¡Tu solución está lista!

Nuestra ayuda de expertos desglosó tu problema en una solución confiable y fácil de entender.

Mira la respuesta
  • Pregunta: ​​​​​​​ Complete the program by performing the function quant so that given an input range inf and sup of positive integers, it returns the number of numbers in that range that are divisible by 3 and 5 at a

    student submitted image, transcription available below​​​​​​​

    Complete the program by performing the function quant so that given an input range inf and sup of positive integers, it returns the number of numbers in that range that are divisible by 3 and 5 at a time.
    
    Example:
    
    inf = 10 and sup 20
    
    would return 1
    It is assumed that inf will always be less than sup (inf < sup).

    #include <iostream>

    using namespace std;

    // Complejidad:

    int cuantos(int inf, int sup){

    // aquí va tu código

    }

    int main(){

    int inf, sup;

    cin >> inf >> sup;

    cout << cuantos(inf, sup) << endl;

    }

    Muestra el texto de la transcripción de la imagen
Texto de la transcripción de la imagen:
Completa el programa realizando la función cuantos para que dada un rango de entrada inf y sup de enteros positivos, regrese la cantidad de números de ese rango que son divisibles entre 3 y 5 a la vez. Ejemplo: inf =10 y sup 20 Regresaría 1 Asume que inf siempre será menor a sup (inf < sup). Baja el archivo de aquí . No olvides poner el tu matrícula, tu nombre así como la complejidad de tu función.