form java blog spot.com
Friday, 14 February 2014
33.WAP to find given no. is repeated or not in java.
class Duplicate
{
public static void main(String args[])
{
int A[]={12,11,13,14};
int l=A.length;
for(int i=0; i<l; i++)
{
for(int j=i+1; j<l; j++)
{
if(A[i]==A[j])
System.out.println("Repeated");
else
System.out.println("Not Repeated");
}
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment