Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- char str[100];
- int x;
- while(1){
- cout<<"Do You Want to Get a String: ";
- cin>>x;
- cout<<"\n";
- if(x==1)
- {
- cout << "Enter a string: ";
- cin >> str;
- cout << "You entered: " << str << endl;
- }
- else{
- return 0;
- }
- cout<<"\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement