Advertisement
Naimul_X

Untitled

Jun 17th, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. char str[100];
  7. int x;
  8.  
  9. while(1){
  10. cout<<"Do You Want to Get a String: ";
  11. cin>>x;
  12. cout<<"\n";
  13. if(x==1)
  14. {
  15. cout << "Enter a string: ";
  16. cin >> str;
  17. cout << "You entered: " << str << endl;
  18. }
  19. else{
  20.  
  21. return 0;
  22. }
  23. cout<<"\n";
  24. }
  25.  
  26.  
  27.  
  28.  
  29. return 0;
  30.  
  31.  
  32.  
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement