Skip to content

Commit 3fabf20

Browse files
authored
Create CopyStrings.cpp
1 parent 6095549 commit 3fabf20

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

CopyStrings.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main()
5+
{
6+
string s1, s2;
7+
8+
cout << "Enter string s1: ";
9+
getline (cin, s1);
10+
11+
s2 = s1;
12+
13+
cout << "s1 = "<< s1 << endl;
14+
cout << "s2 = "<< s2;
15+
16+
return 0;
17+
}

0 commit comments

Comments
 (0)