Multiplying f timestamp and average
Here is the coding for timestamp and average of pixel. how to multiply timestamp value and average value??
Coding for timestamp:
public class GetTimeStamp {
public static void main(String[] args) {
java.util.Date time = new java.util.Date();
System.out.println(new java.sql.Time(time.getTime()));
}
}
Coding For Avarage:
class Average1 {
public static void main (String args[]){
int one = 256789;
int two = 10;
int three = one % two;
System.out.println(" Average In 6 Digit ");
System.out.println(" " + three);
int four = 25678;
int five = 10;
int six = four % five;
System.out.println(" " + six);
int seven = 2567;
int eight = 10;
int nine = seven % eight;
System.out.println(" " + nine);
开发者_如何学JAVA int ten = 256;
int eleven = 10;
int twelve = ten % eleven;
System.out.println(" " + twelve);
int a = 25;
int b = 10;
int c = a % b;
System.out.println(" " + c);
int d = 2;
int e = 10;
int f = d % e;
System.out.println(" " + f);
}
}
In your "code for average" example you are using %
which is modulus where you need to use /
which is division.
int first = 30;
int second = 10;
int average = first / second;;
System.out.println( average );
Other than that I don't understand what you are asking.
精彩评论