int hasil;
int maximum = 10;

void setup() {
  // put your setup code here, to run once:
 Serial.begin(9600);
  int i = 1;
   while(i <= maximum){
     hasil = hasil + i * i;
     Serial.print("("+String(i)+" * " +String(i)+")");
     if (i == maximum){
      Serial.print("=");
     } else {
       Serial.print("+");
     }
     i++;
  }
  Serial.println(hasil);
}

void loop() {
  // put your main code here, to run repeatedly:

}