Program 2 Wap to assign the values 7 and 5 to two different variables and then interchange ther (using third variable)
Answers
Answered by
6
Explanation:
Potential energy of an object always defined with respect to reference point. If location of reference point changes, there is a possibility that potential at that point would change.
In general, we write the potential energy of an object at a height h from earth surface U=mgh. Here we take earth surface as a zero potential level or reference point.
Answered by
1
Answer:
(using java)
class swap
{
void main()
{
int a=7,b=5,c;
c=a;
a=b;
b=c;
System.out.println("a="+a);
System.out.println("b="+b);
}
}
Similar questions
Social Sciences,
15 hours ago
Physics,
15 hours ago
Computer Science,
1 day ago
Math,
1 day ago
Physics,
8 months ago
Math,
8 months ago
Physics,
8 months ago