96.3k views
1 vote
Me dicen cómo hacer este programa en lenguaje C?:

"leer 10 numeros enteros y decir cuantos terminan en 7"

yo no se cómo hacerlo, por el momento se me ocurre esto, pero no se si esta bien encaminado:

#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,num,cont=0;

for(i=0;i<=10;i++)
{
printf("ingrese un numero:");
scanf("%d", &num);
}
if(i%num==7)
cont=cont+1;
else
{
printf("ingrese un numero:");
}
printf("la cantidad de numeros que terminan en 7 es: %d", cont);


return 0;
}


User Swadq
by
4.1k points

1 Answer

3 votes

Answer:

Wut tha h-

Step-by-step explanation:

Im not rude lol.

User Qryckbosch
by
4.6k points