Write a Java Program to Swaping of Two Numbers, Interchange Two Numbers
class prog6
{
public static void main(String args[])
{
int a=10,b=20;
a=a+b;
b=a-b;
a=a-b;
System.out.println("\n A:"+a);
System.out.println("\n B:"+b);
}
}
class prog6
{
public static void main(String args[])
{
int a=10,b=20;
a=a+b;
b=a-b;
a=a-b;
System.out.println("\n A:"+a);
System.out.println("\n B:"+b);
}
}
No comments:
Post a Comment