#include <iostream>using namespace std;int x, somma=0;int main() { cin>>x;while (x!=100) { if ((x%3==0)&&(x%2==0)) {somma=somma+x;}cin>>x;}cout<<somma; return 0;}
2 4 6 43 32 4 27 36 48 100
90
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!