How to write a part of the program that will find two words maximum in length, and print vowels (without repetitions) that have been encountered in them. Characters can only be uppercase Latin letters.
Here that already is:
#include "stdafx.h" #include "iostream" #include "conio.h" #include <set> #include <string> using namespace std; int main(array < System::String ^ >^args) { set < char >simbols; set < char >digits; char *s1 = "QWERTYUIOPASDFGHJKLZXCVBNM"; for (int i = 0; i < strlen(s1); i++) { simbols.insert(s1[i]); } int n = 0; do { cout << "Vvedite kolichestvo slov (ne bolee 10): "; cin >> n; if ((n <= 0) || (n > 10)) // количество слов cout << "Oshibka vvoda" << endl; } while ((n <= 0) || (n > 10)); char strs[10][80]; for (int i = 0; i < n; i++) { cout << "Vvedite slovo: "; cin >> strs[i]; cout << strs[i] << " slovo " << endl; int tmp = 0; for (int j = 0; j < strlen(strs[i]); j++) { if (simbols.count(strs[i][j]) == 1) { //гласные EYUIOA } else { cout << "Vstretilsa nedopustimii simvol" << endl; i--; break; } } } cout << " Vivod bykv = "; _getch(); return 0; }