Skip to main content
1 of 3

Java

public class MainProgram { public static void main(String[] args) { int[] the = { 'T', 'h', 'e' }; int[] most = { 'M', 'o', 's', 't' }; int[] creative = { 'C', 'r', 'e', 'a', 't', 'i', 'v', 'e' }; int[] way = { 'W', 'a', 'y' }; int question = '?'; double x = -3.18906605923E-2; int tTotal = 0; int mTotal = 0; int cTotal = 0; int wTotal = 0; for(int i : the) { tTotal += i; } for(int i : most) { mTotal += i; } for(int i : creative) { cTotal += i; } for(int i : way) { wTotal += i; } System.out.println((int)((tTotal*x)-(mTotal*x)-(cTotal*x)-(wTotal*x)-(question*x))); }//SSCE }//good1 

Output:

42