Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string str;
- cout << "Besedilo(20): ";
- getline(cin, str);
- int stev_str = str.length();
- while (stev_str > 20)
- {
- cout << "Vpisete lahko 20 ali manj znakov!" << endl;
- getline(cin, str);
- stev_str = str.length();
- }
- cout << "Besedilo ima " << stev_str << " znakov." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement