TORONTO KIDS COMPUTER CLUB | Saturday 14:00 Java Homework 10.12
16577
post-template-default,single,single-post,postid-16577,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Saturday 14:00 Java Homework 10.12

15 Oct Saturday 14:00 Java Homework 10.12

Question 1:

Input a string using scanner and print the number of vowels and consonants in the sting.

Sample Input:
bcda

Sample Output:
vowels: 1
consonant : 3


Question 2:

Input a string using scanner and check if the string is a palindrome.
e.g. aba is a palindrome because if you reverse it is still the same.
e.g. abba is a palindrome because if you reverse it is still the same.

Sample Input 1:
aba

Sample Output 1:
It is a palindrome

Sample Input 2:
bcde

Sample Output 2:
It is not a palindrome

No Comments

Sorry, the comment form is closed at this time.