The problem is because you're code is using integer math, not floating point math. Try:
import java.util.Scanner;
import java.util.Random;
public class tempature
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
Random random = new Random();
double c;
double f;
int x;
System.out.println("Do you want Celcius(1) or Fahrenheit(2)");
x = scan.nextInt();
if (x == 1){
System.out.println("type the tempature in Celcius.");
c = scan.nextInt();
f = (c * 9. / 5. + 32); // need the dot to tell java to treat this number as a floating point constant
System.out.println("Your Fahrenheit tempature is " + f);
}
else
{ System.out.println("type the tempature in Fahrenheit.");
c = scan.nextInt();
f = ((c - 32) * (5. / 9.)); // need the dot to tell java to treat this number as a floating point constant
System.out.println("Your Celsius tempature is " + f);
}
}
}