Write a program to find the area and perimeter of a square and rectangle. Store side in s , length in ln and breadth in b. display the results in separate lines.
The value of a is 34 and the value of b is 79. Write a program to interchange the value of a and b. display the variables before interchange and after interchange. Ex:
Before interchange a=34 b= 79
After interchange a=79 b=34
Write JAVA programs to calculate the above. DO NOT USE ANY INPUT METHOD FOR ANY OF THE ABOVE PROGRAMS.
Answers
Answered by
0
Answer:
1) I have given in your previous question
2)
class swap {
public static void main() {
int a=34,b=79,c;
c = a;
a = b;
b = c;
System.out.print("The value of a is "+a+"and b is "+b);
}
}
Similar questions