blob: eae633e4aaa401973086c0ee228a57fbca1562ce (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#import "/template.typ": highlight-output
#highlight-output[```
$ java StringOperations
Menu-driven program for string operations
Enter a string: A quick fox jumps over a lazy dog.
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 2
The string is: A quick brown fox jumps over a lazy dog.
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 3
The string has 8 words.
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 4
The given string reversed is: .god yzal eht revo spmuj xof nworb kciuq A
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 5
The given string isn't case-insensitively palindrome.
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 1
Enter a string: Aa bB C bB Aa
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 5
The given string is case-insensitively palindrome.
Options:
1. Re-enter a string
2. Display the string
3. Count words in the string
4. Reverse the string
5. Case-insensitively check whether the string is palindrome or not
6. Exit
Enter your choice: 6
Bye.
```]
|