Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include<iostream>
  2. #include<climits>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6.  
  7. int main (){
  8. int n = 1;
  9. int sum = 0;
  10. while(n!=0){
  11. cin >> n;
  12. if(n % 3 == 0 && n % 10 == 8){
  13. sum += n;
  14. }
  15. }
  16. cout << sum;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement