Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<climits>
- #include <math.h>
- using namespace std;
- int main (){
- int n = 1;
- int sum = 0;
- while(n!=0){
- cin >> n;
- if(n % 3 == 0 && n % 10 == 8){
- sum += n;
- }
- }
- cout << sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement