1 solutions

  • 0
    @ 2025-11-5 16:13:32

    C :

    #include<stdio.h>
    int main() {
    int i;
    for(i=10;i<=1000;++i) {
        if(i%2==0&&i%3==0&&i%7==0) {
            printf("%d",i);
        printf("\n");
    }
    
    }
    return 0;
    }
    

    C++ :

    #include<iostream>
    using namespace std;
    
    int main() {
    	for(int i=10; i<=1000; ++i){
    		if((i % 2 == 0) && (i % 3 == 0) && (i % 7 == 0)){
    			cout << i << endl;
    		}
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    17587
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By