Hey all im new to this board and i dont know if im posting it in the right thread but i need your help with the following
1. Write a program to store any 2 values in two variables a,b and interchange their values and display them.
2. Write a program to calculate the square and cube of a number passed to a method. Display the number,square and cube.
3. Write a program to accept a value m and hence display it in reverse.
4. Write a program to accept any number and display all its factors.
5. Write a program to accept any day of week and display it in words.
I have to do this in a programme called Blu J -- i need to write in this format...
class two
{
public static void main (String args [])
{
int a=9;int cube;int sq;
sq=a*a;
cube=a*a*a;
System.out.println("The number is" +a);
System.out.println("The square of the number is" = sq);
System.out.println("The cube of the number is" = cube);
}
}
can somebody help me out please???
Any help is appreciated...
thanks all