TimeVsBrightness

TimeVsBrightness
0

#1

public class tesTing {
static int [] arr = {6,2,5,5,4,5,6,3,7,6};
static int Converter(int x){
int a = (int)(x/10);
int b= x-a10;
return arr[a]+arr[b];}
public static void main(String []args){
int B;int maxB = 0;int minB = 100;
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
B=Converter(i)+Converter(j)+Converter(k);
if(B>maxB){maxB = B;}
if(B<minB){minB = B;}}}}
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
if(Converter(i)+Converter(j)+Converter(k) ==maxB){
System.out.println(“Brightness {”+maxB+"}"+"(highest)@"+i+":"+j+":"+k);}
if(Converter(i)+Converter(j)+Converter(k) ==minB){
System.out.println(“Brightness {”+minB+"}"+"(lowest)@"+i+":"+j+":"+k);
}}}}}}[quote=“Abhinay_Singh, post:1, topic:156652, full:true”]
public class tesTing {
static int [] arr = {6,2,5,5,4,5,6,3,7,6};
static int Converter(int x){
int a = (int)(x/10);
int b= x-a
10;
return arr[a]+arr[b];}
public static void main(String []args){
int B;int maxB = 0;int minB = 100;
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
B=Converter(i)+Converter(j)+Converter(k);
if(B>maxB){maxB = B;}
if(B<minB){minB = B;}}}}
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
if(Converter(i)+Converter(j)+Converter(k) ==maxB){
System.out.println(“Brightness {”+maxB+"}"+"(highest)@"+i+":"+j+":"+k);}
if(Converter(i)+Converter(j)+Converter(k) ==minB){
System.out.println(“Brightness {”+minB+"}"+"(lowest)@"+i+":"+j+":"+k);
}}}}}}
[/quote]


#2

What is your question? Also, please format your code to make it easier for others to read. . When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.