Кто знает С++, помогите сделать задание пожалуйста

Приложения:

Ответы

Ответ дал: sokolp2017
0

Ответ:

#include <iostream>

using namespace std;

int main()

{

setlocale(LC_ALL, "ru");

int word = 1;

bool newWord = 1;

string text = "Один Два Три";

for (int i = 0; text[i] != ' '; i++)

{

 if (newWord)

 {

  cout << "Слово - " << word << "   Буквы - " << text[i] << "  " << text[i + 1];

  newWord = 0;

  cout << endl;

 }

 if ((int)text[i] == 32 && (int)text[i + 1] != 32)

 {

  word++;

  newWord = 1;

 }

}

return 0;

}

Объяснение:

Вас заинтересует