Write a java program to input a sentence from the user in lower case and capitalize the first and the last character of each word
Answers
Answered by
0
with scanner
import java.until.*;
class word
{
void input()
{String s,w;
Scanner sc = new scanner (System.in);
System.out.println("enter beta");
String s= sc.next line();
s = s.to lowerCase();
w="";
s=s+' ';
char Ch;
for( i=0;I<s.length;I++)
{
ch= s.charAt(I);
if(CH!=' ')
{
w=w+ch;
}
else
{
import java.until.*;
class word
{
void input()
{String s,w;
Scanner sc = new scanner (System.in);
System.out.println("enter beta");
String s= sc.next line();
s = s.to lowerCase();
w="";
s=s+' ';
char Ch;
for( i=0;I<s.length;I++)
{
ch= s.charAt(I);
if(CH!=' ')
{
w=w+ch;
}
else
{
tokaians:
its not clear
Similar questions
Math,
8 months ago
Science,
8 months ago
English,
8 months ago
Computer Science,
1 year ago
English,
1 year ago
Science,
1 year ago
Social Sciences,
1 year ago