//this is my program to reverse the case of characters i.e. lower case to upper case and uppercase to lowercase in a string what is the error plz tell me
import java.util.*;
public class tnaminatina
{
public void check()
{String a="",b="";
Scanner sc=new Scanner(System.in);
System.out.println("enter sentence");
String s=sc.next();
System.out.println("enter sentence");
String g=sc.next();
System.out.println("enter sentence");
String d=sc.next();
a=s.concat(g);
b=a.concat(d);
System.out.println(b);
b=b.toUpperCase();
System.out.println(b);
b=b.trim();
for(int i=0;i96&&b.charAt(i)<=122)
c=(char)b.charAt(i)+32;
else
if(b.charAt(i)>64&&b.charAt(i)<=90)
c=(char)b.charAt(i)-32;
}
System.out.println(b);
}
} |
|
| asked by Adithya Kannan (adiketh198) 9 years ago | |
1 | |
Kindly provide working and answer of the question in the comments section. |
|
| asked by Anvesha Mishra (learner67) 9 years ago | |
2 | |
where can i find predict the output questions on the net? |
|
| asked by Thulluminati (asthetic31) 9 years ago | |
1 | |
public class p
{
public static void main (String args [])
{
int i , a=0,j,b=0;
for (j=2;j<=100;j++)
{
for(i=1;i<=j;i++)
{
if(j%i==0)
b=b+1;
}
if(b<=2)
a=a+j;
}
System.out.print(a);
}
}
program to find the sum of prime num , please correct my mistake in this !!! |
|
| asked by Hareesh Ramakrishnan (hareesh0922) 9 years ago | |
1 | |

