We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4256d21 commit d3661b6Copy full SHA for d3661b6
euler01
@@ -3,17 +3,18 @@ using namespace std;
3
4
int main()
5
{
6
- int sh;
7
8
- cout << "Shumefishi i 3 ose 5: ";
9
- cin >> sh;
10
- cout << endl;
+ int shuma=0;
11
12
- for (int i = 0; i < 1000; i++) {
13
- if (i % 3 == 0 || i % 5 == 0)
+ for(int i=1; i<=1000; i++){
+ if( i%3 ==0 || i%5 ==0) {
14
15
cout << i << ", ";
+
+ shuma += i;
16
}
17
-
+}
+ cout << endl << "Shuma e numrave: "<< shuma << endl;
18
19
return 0;
20
0 commit comments