Untitled
unknown
plain_text
3 years ago
676 B
13
Indexable
#include <iostream>
using namespace std;
int main()
{
cout << "Enter name and press '.' at the end:"<<endl;
bool strValid = false;
while (!strValid)
{
char inputChar = getc(stdin);
if (inputChar < 'A' || inputChar>'Z')
{
continue;
}
bool scanningActive = true;
while (scanningActive)
{
char inputChar = getc(stdin);
if (inputChar == '.')
{
strValid = true;
break;
}
if (inputChar < 'a' || inputChar>'z')
{
break;
}
}
}
return 0;
}Editor is loading...