" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
using namespace std;
int main()
{
int suma = 0, liczba;
cout << "Podaj liczbe: ";
cin >> liczba;
while (liczba)
{
suma += liczba % 10;
liczba /= 10;
}
cout << "Obliczona suma: " << suma << endl;
cout << "COCACOLA";
getchar();
}