pseudocod:
x, s intregi
citeste x
s <- 0
cat timp x!=0 executa
{
daca x%10==5 atunci s <- s + x
citeste x
}
scrie s
c++
#include <iostream>
using namespace std;
int main()
{
int x, s=0;
cin >> x;
while (x!=0)
{
if (x%10==5) s=s+x;
cin >> x;
}
cout << s;
return 0;
}