Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int M, kaina = 0, kiekis = 0, v = 0;
- for(int i = 0; i < 9999; i++){
- cin >> M;
- if(M == 00) break;
- else{
- kaina+=M/10;
- kiekis+=M%10;
- v++;
- }
- }
- cout << "Kaina = " << kaina << ", kiekis = " << kiekis << ", viso = " << v;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement