Program that input ten names from user c plus plus?

1 answer

Answer

1196966

2026-05-17 02:50

+ Follow

#include<iOStream>

#include<vector>

#include<string>

int main()

{

std::vector<std::string> names;

for (int loop=0; loop!=10;)

{

std::cout << ++loop << " enter a name: ";

std::string name;

std::cin >> name;

names.push_back (name);

}

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.