jakaria_hossain

Multiple of 3 and 5

Oct 2nd, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define fast()(ios_base::sync_with_stdio(false),cin.tie(NULL));
  4. int main()
  5. {
  6. int sum=23,i;
  7. for(i=10;i<=999;i++)
  8. {
  9. if(i%3==0 || i%5==0)sum+=i;
  10. }
  11. printf("%d\n",sum);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment