#include "stdafx.h"
#include <iostream>
using namespace std; //http://projecteuler.net/problem=1
void findout() { //efekanpulatli.blogspot.com first problem's solution
int tot=0;
for(int i=1;i<1000;i++) {
if(i % 3 == 0 || i%5 == 0) {
tot+=i;
}
}
cout << tot << " efekanpulatli.blogspot.com"<< endl;
}
int main()
{
findout();
system("pause");
return 0;
}

Hiç yorum yok:
Yorum Gönder