#include <stdio.h> int main() { long long int num; long long int cont = 0; scanf(" %lld", &num); while(num>0){ // scanf("%d", &num); if(num % 3 == 0 || num % 5 == 0 ) cont++; num--; } printf("There are %lld numbers which check the conditions", cont); } Change accordingly! Signed/unsigned..
Обсуждают сегодня