Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <windows.h>
- using namespace std;
- int main(){
- string sName[21];
- cout << "Enter names: ";
- sName[0]="0";
- for(int i=1;i<21;i++){
- if(sName[i-1]=="q"){
- sName[i-1]="\0";
- break;
- }
- else{
- cin>>sName[i];
- cout<<endl;
- }
- }
- cout << endl;
- for(int i=1;i<21;i++){
- if(sName[i]!="\0"){
- cout << sName[i] << endl;
- }
- }
- system("pause>nul");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement