1 solutions

  • 0
    @ 2025-11-5 16:15:27

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int s;
    int main()
    {
    	for(int i=1;i<=100;i++)
    		if(i%2==0&&i%3==0) s+=i;
    	cout<<s;	 
        return 0;
    }
    

    Pascal :

    var s,i:integer;
    begin
      s:=0;
      for i:=6 to 96 do
      if i mod 6=0 then s:=s+i;writeln(s);
    end.
    
    
    
    
    
    
    • 1

    Information

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