Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char userWords[101];
- int i,b,symbolNum;
- symbolNum=101;
- cout << "enter symbols(words)(limit 30 symbols)" << endl;
- cin.getline(userWords,101);
- cout << "these symbols are taking part in the test now" << endl;
- cout << userWords << endl;
- for (i = 0;i < symbolNum;i++){
- if(userWords[i] == '\0'){
- symbolNum=i;
- break;
- }
- }
- int symbol=0;
- for ( i = 0;i < symbolNum;i++ ){
- if(userWords[symbol] >= 'a' && userWords[symbol] <= 'z'){
- userWords[symbol]=(int)userWords[symbol]-32;
- }
- symbol++;
- }
- cout<< " result----"<< endl;
- cout<<userWords;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement