Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int suma = 0;
- int numar;
- do {
- cin >> numar;
- suma += numar;
- } while (suma < 100);
- cout << suma << endl;
- return 0;
- }
- #include <iostream>
- using namespace std;
- int main() {
- int suma = 0;
- int numar;
- while ( suma < 100) {
- cin >> numar;
- suma += numar;
- }
- cout << suma << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement