rendered paste bodyimport static pt.ua.prog.WIO.*;
class ex2Teste
{
static int MAX_ELEMS = 20;
public static void main(String [] args)
{
String s;
s= readLine("Introduza a frase: ");
boolean result;
result = verificaFrase(s);
if(result)
println("Frase ok");
else
println("Frase not ok");
}
static boolean verificaFrase(String s)
{
for(int i=0; i<s.length(); i++)
{
char c = s.charAt(i);
if(!(c==',' || c=='!' || c==' ' || c=='?' || (c>='a' && c<='z') || (c>='A' && c<='Z')))
return false;
}
return true;
}
}