Java program to find heat capacity
import java.util.*;
class HeatCapacity{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
System.out.println("Enter amount of heat transferred (in joules)");
float heat=sc.nextFloat();
System.out.println("Enter rise (difference) in temperature");
float temperature=sc.nextFloat();
System.out.println("Amount of heat supplied "+heat);
System.out.println("Rise in temperature "+temperature);
float heatCapacity;
heatCapacity = heat/temperature;
System.out.println("Heat Capacity = "+heatCapacity+"j/c");
}
}