7-2 sdut-JAVA-Words Containing AB
分数 9
全屏浏览
切换布局
作者 马新娟
单位 山东理工大学
Write a program that requests a word as input containing the two letters a and b (in this order). Examples of valid words would include, abacus, cab, and anybody, whereas invalid words would include branch, back, and bank. You should only concern yourself with the first occurrence of a and b should they exist.
Input Specification:
a word as input containing the two letters a and b (in this order).
Output Specification:
Output the input word is valid or not.
Sample Input:
Sample Output:
No input provided to check.
Sample Input:
about12
Sample Output:
Input should comprise o